Skip to content

Commit f3d83fe

Browse files
authored
Merge pull request #255 from stac-utils/pv/fix-core-check-for-root-and-self-type
Fixed check of landing page link rels for self and root.
2 parents b10dfc6 + 6918302 commit f3d83fe

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased] - TBD
99

10+
## [0.4.3] - 2023-02-10
11+
12+
### Fixed
13+
14+
- Fixed check of landing page link rels for self and root. These were incorrectly
15+
checked for having a type of geojson, but they should just be json.
16+
1017
## [0.4.2] - 2023-01-20
1118

1219
### Fixed
@@ -124,6 +131,7 @@ Release is primarily to publish to Read the Docs as a version.
124131
- Fixed issue with item-search validation relying on collections behavior
125132

126133
[unreleased]: https://github.com/stac-utils/stac-api-validator/compare/v0.4.2...main
134+
[0.4.3]: https://github.com/stac-utils/stac-api-validator/tree/v0.4.3
127135
[0.4.2]: https://github.com/stac-utils/stac-api-validator/tree/v0.4.2
128136
[0.4.1]: https://github.com/stac-utils/stac-api-validator/tree/v0.4.1
129137
[0.4.0]: https://github.com/stac-utils/stac-api-validator/tree/v0.4.0

package-lock.json

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

src/stac_api_validator/validations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -620,13 +620,13 @@ def validate_core(
620620
if not (root := link_by_rel(links, "root")):
621621
errors += "/ : Link[rel=root] must exist"
622622
else:
623-
if not is_geojson_type(root.get("type")):
623+
if not is_json_type(root.get("type")):
624624
errors += f"/ : Link[rel=root] type is not application/geo+json, instead {root.get('type')}"
625625

626626
if not (_self := link_by_rel(links, "self")):
627627
warnings += "/ : Link[rel=self] must exist"
628628
else:
629-
if not is_geojson_type(_self.get("type")):
629+
if not is_json_type(_self.get("type")):
630630
errors += f"/ : Link[rel=self] type is not application/geo+json, instead {_self.get('type')}"
631631

632632
if not (service_desc := link_by_rel(links, "service-desc")):

0 commit comments

Comments
 (0)