diff --git a/src/schema-validation.jsonc b/src/schema-validation.jsonc index 1a645a8c425..0ad5a02147f 100644 --- a/src/schema-validation.jsonc +++ b/src/schema-validation.jsonc @@ -157,7 +157,6 @@ "jovo-language-model.json", "jscsrc.json", "jsdoc-1.0.0.json", - "json-api-1.0.json", "jsone.json", "kestra-0.18.0.json", "kestra-0.18.1.json", diff --git a/src/schemas/json/json-api-1.0.json b/src/schemas/json/json-api-1.0.json index 46a61aa5080..6d614316674 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", @@ -167,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." } }, @@ -177,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"] } ], @@ -365,7 +394,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"