From 4f8e9c21b73487799664d0115e976bc645723c4e Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Tue, 14 May 2024 10:29:39 +0200 Subject: [PATCH 1/2] Add validation for absolute self link in item schema --- item-spec/json-schema/item.json | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/item-spec/json-schema/item.json b/item-spec/json-schema/item.json index ede4d62a..0511f432 100644 --- a/item-spec/json-schema/item.json +++ b/item-spec/json-schema/item.json @@ -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" + } + } } }, { From f6a2114eb5cb3f32012819fe4afa404da70d08fa Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Tue, 14 May 2024 10:31:24 +0200 Subject: [PATCH 2/2] updated changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3462d023..1479bfb5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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)) ### Changed