From 812cb0ebd3b7bea53df3a84e94e47f5359a5450f Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 20:44:19 -0400 Subject: [PATCH 1/2] Migrated to draft-07 Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schemas/json/json-api-1.0.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/schemas/json/json-api-1.0.json b/src/schemas/json/json-api-1.0.json index 46a61aa5080..6252df1a118 100644 --- a/src/schemas/json/json-api-1.0.json +++ b/src/schemas/json/json-api-1.0.json @@ -1,5 +1,6 @@ { - "$schema": "http://json-schema.org/draft-04/schema#", + "$schema": "http://json-schema.org/draft-07/schema#", + "$id": "https://json.schemastore.org/json-api-1.0.json", "definitions": { "success": { "type": "object", @@ -365,7 +366,6 @@ } }, "description": "This is a schema for responses in the JSON API format. For more, see http://jsonapi.org", - "id": "https://json.schemastore.org/json-api-1.0.json", "oneOf": [ { "$ref": "#/definitions/success" From 01c201f73be3ddc835e5a161f1cedaffc03ff178 Mon Sep 17 00:00:00 2001 From: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> Date: Thu, 16 Jul 2026 20:50:38 -0400 Subject: [PATCH 2/2] Enabled strict validation Signed-off-by: Vessel9817 <151808241+Vessel9817@users.noreply.github.com> --- src/schema-validation.jsonc | 1 - src/schemas/json/json-api-1.0.json | 66 +++++++++++++++++++++--------- 2 files changed, 47 insertions(+), 20 deletions(-) diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index cb1b30437e6..2354862c25e 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -168,7 +168,6 @@ "jscsrc.json", "jsdoc-1.0.0.json", "jshintrc.json", - "json-api-1.0.json", "json-patch.json", "jsone.json", "kestra-0.18.0.json", diff --git a/src/schemas/json/json-api-1.0.json b/src/schemas/json/json-api-1.0.json index 6252df1a118..6d614316674 100644 --- a/src/schemas/json/json-api-1.0.json +++ b/src/schemas/json/json-api-1.0.json @@ -168,6 +168,29 @@ "type": "object", "patternProperties": { "^(?!relationships$|links$)\\w[-\\w_]*$": { + "anyOf": [ + { + "type": "array" + }, + { + "type": "boolean" + }, + { + "type": "integer" + }, + { + "type": "null" + }, + { + "type": "number" + }, + { + "type": "object" + }, + { + "type": "string" + } + ], "description": "Attributes may contain any valid JSON value." } }, @@ -178,33 +201,38 @@ "type": "object", "patternProperties": { "^\\w[-\\w_]*$": { - "properties": { - "links": { - "$ref": "#/definitions/links" - }, - "data": { - "description": "Member, whose value represents \"resource linkage\".", - "oneOf": [ - { - "$ref": "#/definitions/relationshipToOne" - }, - { - "$ref": "#/definitions/relationshipToMany" - } - ] - }, - "meta": { - "$ref": "#/definitions/meta" - } - }, + "type": "object", "anyOf": [ { + "properties": { + "data": { + "description": "Member, whose value represents \"resource linkage\".", + "oneOf": [ + { + "$ref": "#/definitions/relationshipToOne" + }, + { + "$ref": "#/definitions/relationshipToMany" + } + ] + } + }, "required": ["data"] }, { + "properties": { + "meta": { + "$ref": "#/definitions/meta" + } + }, "required": ["meta"] }, { + "properties": { + "links": { + "$ref": "#/definitions/links" + } + }, "required": ["links"] } ],