From bdb8ce475839b5e27912abd410d14484a4664a8b Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Sat, 18 Jul 2026 20:01:29 -0400 Subject: [PATCH 1/2] Migrated to draft-07 Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/ninjs-1.0.json | 4 ++-- src/schemas/json/ninjs-1.1.json | 4 ++-- src/schemas/json/ninjs-1.2.json | 4 ++-- src/schemas/json/ninjs-1.3.json | 4 ++-- src/schemas/json/ninjs-1.4.json | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/schemas/json/ninjs-1.0.json b/src/schemas/json/ninjs-1.0.json index ae37440b99a..1c9403444e3 100644 --- a/src/schemas/json/ninjs-1.0.json +++ b/src/schemas/json/ninjs-1.0.json @@ -1,8 +1,8 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.0.json#", "additionalProperties": false, "description": "A news item as JSON object -- copyright 2013 IPTC - International Press Telecommunications Council - www.iptc.org - This document is published under the Creative Commons Attribution 3.0 license, see http://creativecommons.org/licenses/by/3.0/ $$comment: as of 2013-11-07, edited by MS for the IPTC ninjs-dev group ", - "id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.0.json#", "patternProperties": { "^description_[a-zA-Z0-9_]+": { "description": "A free-form textual description of the content of the item. (The string appended to description_ in the property name should reflect the format of the text)", diff --git a/src/schemas/json/ninjs-1.1.json b/src/schemas/json/ninjs-1.1.json index 3c0e46bc680..1855c8040d0 100644 --- a/src/schemas/json/ninjs-1.1.json +++ b/src/schemas/json/ninjs-1.1.json @@ -1,8 +1,8 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.1.json#", "additionalProperties": false, "description": "A news item as JSON object -- copyright 2014 IPTC - International Press Telecommunications Council - www.iptc.org - This document is published under the Creative Commons Attribution 3.0 license, see http://creativecommons.org/licenses/by/3.0/ $$comment: as of 2014-03-13 ", - "id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.1.json#", "patternProperties": { "^description_[a-zA-Z0-9_]+": { "description": "A free-form textual description of the content of the item. (The string appended to description_ in the property name should reflect the format of the text)", diff --git a/src/schemas/json/ninjs-1.2.json b/src/schemas/json/ninjs-1.2.json index 7a9b023c627..74ee719f69a 100644 --- a/src/schemas/json/ninjs-1.2.json +++ b/src/schemas/json/ninjs-1.2.json @@ -1,8 +1,8 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.2.json#", "additionalProperties": false, "description": "A news item as JSON object -- copyright 2019 IPTC - International Press Telecommunications Council - www.iptc.org - This document is published under the Creative Commons Attribution 4.0 license, see http://creativecommons.org/licenses/by/4.0/ $$comment: as of 2019-10-16 ", - "id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.2.json#", "patternProperties": { "^description_[a-zA-Z0-9_]+": { "title": "Description", diff --git a/src/schemas/json/ninjs-1.3.json b/src/schemas/json/ninjs-1.3.json index 69023a9c85f..faf968e0d64 100644 --- a/src/schemas/json/ninjs-1.3.json +++ b/src/schemas/json/ninjs-1.3.json @@ -1,8 +1,8 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.3.json#", "additionalProperties": false, "description": "A news item as JSON object -- copyright 2020 IPTC - International Press Telecommunications Council - www.iptc.org - This document is published under the Creative Commons Attribution 4.0 license, see http://creativecommons.org/licenses/by/4.0/", - "id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.3.json#", "patternProperties": { "^description_[a-zA-Z0-9_]+": { "title": "Description", diff --git a/src/schemas/json/ninjs-1.4.json b/src/schemas/json/ninjs-1.4.json index c82235711c6..e7e71fefe40 100644 --- a/src/schemas/json/ninjs-1.4.json +++ b/src/schemas/json/ninjs-1.4.json @@ -1,6 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", - "id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.4.json#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "http://www.iptc.org/std/ninjs/ninjs-schema_1.4.json#", "type": "object", "title": "IPTC ninjs - News in JSON - version 1.4 (approved, 18 May 2022)", "description": "A news item as JSON object -- copyright 2022 IPTC - International Press Telecommunications Council - www.iptc.org - This document is published under the Creative Commons Attribution 4.0 license, see http://creativecommons.org/licenses/by/4.0/", From fa56f48398fcf003544965c959c65bbe7faa4d25 Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Sat, 18 Jul 2026 20:15:04 -0400 Subject: [PATCH 2/2] Enabled strict validation [ninjs 1.4 reference][1.4] [ninjs 2.0 reference][1.4] [1.4]: https://iptc.org/std/ninjs/ninjs-schema_1.4.json [2.0]: https://iptc.org/std/ninjs/ninjs-schema_2.0.json Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 2 - src/schemas/json/ninjs-1.4.json | 27 ++++++----- src/schemas/json/ninjs-2.0.json | 79 ++++++++++++++++----------------- 3 files changed, 53 insertions(+), 55 deletions(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index 1a645a8c425..a38823e8091 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -187,8 +187,6 @@ "nest-cli.json", "netlify.json", "nightwatch.json", - "ninjs-1.4.json", - "ninjs-2.0.json", "now.json", "npmpackagejsonlintrc.json", "nswag.json", diff --git a/src/schemas/json/ninjs-1.4.json b/src/schemas/json/ninjs-1.4.json index e7e71fefe40..c33a4bd2177 100644 --- a/src/schemas/json/ninjs-1.4.json +++ b/src/schemas/json/ninjs-1.4.json @@ -584,25 +584,28 @@ "title": "Language id", "description": "Identifier for the Rights Expression language used. nar:@langid", "format": "uri" - }, - "linkedrights": { - "title": "Linked rights", - "description": "A link from the current Item to Web resource with rights related information. nar:link", - "type": "string", - "format": "uri" - }, - "encodedrights": { - "title": "Encoded Rights", - "additionalProperties": false, - "type": "string", - "description": "Contains a rights expression as defined by a Rights Expression Language. nar:rightsExpressionXML or nar:rightsExpressionData" } }, "oneOf": [ { + "properties": { + "linkedrights": { + "title": "Linked rights", + "description": "A link from the current Item to Web resource with rights related information. nar:link", + "type": "string", + "format": "uri" + } + }, "required": ["linkedrights"] }, { + "properties": { + "encodedrights": { + "title": "Encoded Rights", + "type": "string", + "description": "Contains a rights expression as defined by a Rights Expression Language. nar:rightsExpressionXML or nar:rightsExpressionData" + } + }, "required": ["encodedrights"] } ] diff --git a/src/schemas/json/ninjs-2.0.json b/src/schemas/json/ninjs-2.0.json index cb2618b82c6..b126c3b9292 100644 --- a/src/schemas/json/ninjs-2.0.json +++ b/src/schemas/json/ninjs-2.0.json @@ -280,37 +280,33 @@ "places": { "title": "Places", "description": "An array of named locations. nar:subject", - "additionalProperties": false, "type": "array", "items": { "type": "object", - "anyOf": [ - { - "properties": { - "name": { - "title": "Name", - "description": "The name of the place", - "type": "string" - }, - "rel": { - "title": "Relationship", - "description": "The relationship of the content of the news object to the place", - "type": "string" - }, - "uri": { - "title": "URI", - "description": "The identifier for the place as a complete uri", - "type": "string", - "format": "uri" - }, - "literal": { - "title": "Literal", - "description": "The code for the place as a literal", - "type": "string" - } - } + "additionalProperties": true, + "properties": { + "name": { + "title": "Name", + "description": "The name of the place", + "type": "string" + }, + "rel": { + "title": "Relationship", + "description": "The relationship of the content of the news object to the place", + "type": "string" + }, + "uri": { + "title": "URI", + "description": "The identifier for the place as a complete uri", + "type": "string", + "format": "uri" + }, + "literal": { + "title": "Literal", + "description": "The code for the place as a literal", + "type": "string" } - ] + } } }, "subjects": { @@ -466,7 +462,6 @@ "title": "Renditions", "description": "An array of objects with different renditions of the news object. nar:remoteContent", "type": "array", - "additionalProperties": false, "items": { "description": "A specific rendition of the content of the news object. (Description changed in version 1.2 according to issue #17.)", "type": "object", @@ -526,7 +521,6 @@ "title": "Associations", "description": "An array of objects with content of news objects which are associated with this news object.", "type": "array", - "additionalProperties": false, "items": { "description": "One associated object where each object can use all properties in ninjs.", "type": "object", @@ -656,25 +650,28 @@ "title": "Language id", "description": "Identifier for the Rights Expression language used. nar:@langid", "format": "uri" - }, - "linkedrights": { - "title": "Linked rights", - "description": "A link from the current Item to Web resource with rights related information. nar:link", - "type": "string", - "format": "uri" - }, - "encodedrights": { - "title": "Encoded Rights", - "additionalProperties": false, - "type": "string", - "description": "Contains a rights expression as defined by a Rights Expression Language. nar:rightsExpressionXML or nar:rightsExpressionData" } }, "oneOf": [ { + "properties": { + "linkedrights": { + "title": "Linked rights", + "description": "A link from the current Item to Web resource with rights related information. nar:link", + "type": "string", + "format": "uri" + } + }, "required": ["linkedrights"] }, { + "properties": { + "encodedrights": { + "title": "Encoded Rights", + "type": "string", + "description": "Contains a rights expression as defined by a Rights Expression Language. nar:rightsExpressionXML or nar:rightsExpressionData" + } + }, "required": ["encodedrights"] } ]