Skip to content

Commit 8700ea7

Browse files
committed
add test for ids overriding all other parameters, and for incorrect behavior around the accept and content-type for service-desc endpoint
1 parent be5fce8 commit 8700ea7

File tree

5 files changed

+203
-53
lines changed

5 files changed

+203
-53
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [Unreleased] - TBD
9+
10+
### Added
11+
12+
- Validation that using the `ids` parameter does not override all other parameters, as was the behavior
13+
prior to v1.0.0-beta.1.
14+
15+
### Changed
16+
17+
### Deprecated
18+
19+
### Removed
20+
21+
### Fixed
22+
823
## [0.0.2] - 2022-09-26
924

1025
### Added

poetry.lock

Lines changed: 53 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ click = ">=8.0.1"
2121
pystac-client = "^0.5.0"
2222
requests = "^2.28.1"
2323
pystac = {extras = ["orjson"], version = "^1.6.1"}
24+
jsonschema = "^4.16.0"
2425

2526
[tool.poetry.dev-dependencies]
2627
Pygments = ">=2.10.0"

src/stac_api_validator/__main__.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
default=True,
2727
help="Test all validations with POST method for requests in addition to GET",
2828
)
29+
@click.option(
30+
"--collection",
31+
required=True,
32+
help="The name of the collection to use for some tests.",
33+
)
2934
@click.option(
3035
"--conformance",
3136
"conformance_classes",
@@ -45,7 +50,11 @@
4550
help="Conformance class URIs to validate",
4651
)
4752
def main(
48-
log_level: str, root_url: str, post: bool, conformance_classes: List[str]
53+
log_level: str,
54+
root_url: str,
55+
post: bool,
56+
conformance_classes: List[str],
57+
collection: str,
4958
) -> int:
5059
"""STAC API Validator."""
5160

@@ -54,7 +63,9 @@ def main(
5463
print(f"Validating {root_url}", flush=True)
5564

5665
try:
57-
(warnings, errors) = validate_api(root_url, post, conformance_classes)
66+
(warnings, errors) = validate_api(
67+
root_url, post, conformance_classes, collection
68+
)
5869
except Exception as e:
5970
print(f"Failed.\nError {root_url}: {type(e)} {str(e)}")
6071
traceback.print_exc()

0 commit comments

Comments
 (0)