Skip to content

remove no-post flag in favor of looking at landing page #140

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased] - TBD

### Removed

- Removed the `--post/--no-post` parameter in favor of looking in the landing page for the `method` field of the
search link relation

### Added

- Added unit tests
Expand Down
2 changes: 1 addition & 1 deletion COMPLIANCE_REPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Date: 06-Oct-2022
Output

```
$ poetry run stac-api-validator --root-url https://tamn.snapplanet.io --conformance features --conformance item-search --conformance filter --collection S2 --geometry '{"type": "Polygon", "coordinates": [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]]]}' --no-post
$ poetry run stac-api-validator --root-url https://tamn.snapplanet.io --conformance features --conformance item-search --conformance filter --collection S2 --geometry '{"type": "Polygon", "coordinates": [[[100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0]]]}'
Validating https://tamn.snapplanet.io
STAC API - Core conformance class found.
STAC API - Features conformance class found.
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,6 @@ Options:
--log-level TEXT Logging level, one of DEBUG, INFO, WARN,
ERROR, CRITICAL
--root-url TEXT STAC API Root / Landing Page URL [required]
--post / --no-post Test all validations with POST method for
requests in addition to GET
--collection TEXT The name of the collection to use for item-
search, collections, and features tests.
--geometry TEXT The GeoJSON geometry to use for intersection
Expand Down Expand Up @@ -156,9 +154,6 @@ errors:
- POST Search with bbox:[100.0, 0.0, 0.0, 105.0, 1.0, 1.0] returned status code 400
```

Additionally, the `--no-post` option can be specified to only test GET requests, instead of the default of using
both GET and POST.

## Validating OGC API Features - Part 1 compliance

A STAC API that conforms to the "STAC API - Features" conformance class will also be a valid implementation
Expand Down
7 changes: 0 additions & 7 deletions src/stac_api_validator/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,6 @@
required=True,
help="STAC API Root / Landing Page URL",
)
@click.option(
"--post/--no-post",
default=True,
help="Test all validations with POST method for requests in addition to GET",
)
@click.option(
"--collection",
help="The name of the collection to use for item-search, collections, and features tests.",
Expand Down Expand Up @@ -57,7 +52,6 @@
def main(
log_level: str,
root_url: str,
post: bool,
conformance_classes: List[str],
collection: Optional[str],
geometry: Optional[str],
Expand All @@ -69,7 +63,6 @@ def main(
try:
(warnings, errors) = validate_api(
root_url=root_url,
post=post,
conformance_classes=conformance_classes,
collection=collection,
geometry=geometry,
Expand Down
Loading