From 4f8e9c21b73487799664d0115e976bc645723c4e Mon Sep 17 00:00:00 2001 From: Emmanuel Mathot Date: Tue, 14 May 2024 10:29:39 +0200 Subject: [PATCH] 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" + } + } } }, {