Skip to content

Commit

Permalink
Add validation for absolute self link in item schema (#1281)
Browse files Browse the repository at this point in the history
* Add validation for absolute self link in item schema
  • Loading branch information
emmanuelmathot authored Jul 8, 2024
1 parent 2055e7c commit 3a61f75
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- The `keywords` field known from Collections is available in common metadata. ([#1187](https://github.com/radiantearth/stac-spec/issues/1187))
- The `license` field additionally supports SPDX expressions and the value `other`.
- The `roles` field known from Assets and Providers is available in common metadata. ([#1267](https://github.com/radiantearth/stac-spec/issues/1267))
- Validation for absolute self link in item schema. ([#1281](https://github.com/radiantearth/stac-spec/issues/1281))
- Best practice: Link titles should exactly reflect the title of the corresponding entity ([#1168](https://github.com/radiantearth/stac-spec/issues/1168))

### Changed
Expand Down
15 changes: 15 additions & 0 deletions item-spec/json-schema/item.json
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,21 @@
"title": "Link title",
"type": "string"
}
},
"$comment": "Link with relationship `self` must be absolute URI",
"if": {
"properties": {
"rel": {
"const": "self"
}
}
},
"then": {
"properties": {
"href": {
"format": "iri"
}
}
}
},
{
Expand Down

0 comments on commit 3a61f75

Please sign in to comment.