From 8ca6f8783599b68ddf0f4ca70d8869a8480c81f7 Mon Sep 17 00:00:00 2001 From: Balduin Landolt <33053745+BalduinLandolt@users.noreply.github.com> Date: Thu, 28 Apr 2022 16:12:27 +0200 Subject: [PATCH] refactor(json-schema): change JSON schema version to draft-07 (DEV-848) (#188) --- knora/dsplib/schemas/lists-only.json | 2 +- knora/dsplib/schemas/lists.json | 2 +- knora/dsplib/schemas/ontology.json | 86 ++++++++++++++++------ knora/dsplib/schemas/properties-only.json | 88 +++++++++++++++++------ knora/dsplib/schemas/resources-only.json | 2 +- 5 files changed, 135 insertions(+), 45 deletions(-) diff --git a/knora/dsplib/schemas/lists-only.json b/knora/dsplib/schemas/lists-only.json index a2cbc4467..8ed6bc9c6 100644 --- a/knora/dsplib/schemas/lists-only.json +++ b/knora/dsplib/schemas/lists-only.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://dasch.swiss/schema/list-only.json", "title": "JSON schema for DSP lists", "description": "JSON schema for the lists section used in DSP ontologies", diff --git a/knora/dsplib/schemas/lists.json b/knora/dsplib/schemas/lists.json index 582c3e730..47ade9f21 100644 --- a/knora/dsplib/schemas/lists.json +++ b/knora/dsplib/schemas/lists.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://dasch.swiss/schema/lists.json", "title": "JSON schema for DSP lists", "description": "JSON schema for lists used in DSP ontologies", diff --git a/knora/dsplib/schemas/ontology.json b/knora/dsplib/schemas/ontology.json index 053105e4b..ad91e4d5a 100644 --- a/knora/dsplib/schemas/ontology.json +++ b/knora/dsplib/schemas/ontology.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://dasch.swiss/schema/ontology.json", "title": "JSON schema for DSP ontologies", "description": "JSON schema for DSP ontologies", @@ -434,7 +434,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasRepresentation"] + "enum": [ + "hasRepresentation" + ] }, { "$ref": "#/definitions/prefixedname" @@ -464,7 +466,10 @@ "type": "string", "oneOf": [ { - "enum": ["hasComment","hasValue"] + "enum": [ + "hasComment", + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -473,7 +478,11 @@ } }, "gui_element": { - "enum": [ "SimpleText", "Textarea", "Richtext" ] + "enum": [ + "SimpleText", + "Textarea", + "Richtext" + ] } } } @@ -494,7 +503,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasColor"] + "enum": [ + "hasColor" + ] }, { "$ref": "#/definitions/prefixedname" @@ -524,7 +535,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -554,7 +567,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -584,7 +599,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -593,7 +610,10 @@ } }, "gui_element": { - "enum": ["Slider","SimpleText"] + "enum": [ + "Slider", + "SimpleText" + ] } } } @@ -614,7 +634,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasGeometry"] + "enum": [ + "hasGeometry" + ] }, { "$ref": "#/definitions/prefixedname" @@ -647,7 +669,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -656,8 +680,7 @@ } }, "gui_element": { - "const": - "Geonames" + "const": "Geonames" } } } @@ -678,7 +701,10 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue", "seqnum"] + "enum": [ + "hasValue", + "seqnum" + ] }, { "$ref": "#/definitions/prefixedname" @@ -711,7 +737,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -741,7 +769,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -771,7 +801,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -805,7 +837,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -976,7 +1010,10 @@ "if": { "properties": { "gui_element": { - "enum": ["Radio", "List"] + "enum": [ + "Radio", + "List" + ] } } }, @@ -990,7 +1027,6 @@ } }, "additionalProperties": false - } }, "required": [ @@ -1024,7 +1060,15 @@ "if": { "properties": { "gui_element": { - "enum": ["Richtext", "Date", "TimeStamp", "Geometry", "Geonames", "Checkbox", "Interval"] + "enum": [ + "Richtext", + "Date", + "TimeStamp", + "Geometry", + "Geonames", + "Checkbox", + "Interval" + ] } } }, diff --git a/knora/dsplib/schemas/properties-only.json b/knora/dsplib/schemas/properties-only.json index 9a1a42654..71c36bd2f 100644 --- a/knora/dsplib/schemas/properties-only.json +++ b/knora/dsplib/schemas/properties-only.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://dasch.swiss/schema/properties-only.json", "title": "JSON schema for properties used in DSP ontologies", "description": "JSON schema for the properties section used in DSP ontologies", @@ -221,7 +221,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasRepresentation"] + "enum": [ + "hasRepresentation" + ] }, { "$ref": "#/definitions/prefixedname" @@ -250,7 +252,12 @@ "items": { "type": "string", "oneOf": [ - {"enum": ["hasComment","hasValue"] }, + { + "enum": [ + "hasComment", + "hasValue" + ] + }, { "$ref": "#/definitions/prefixedname" } @@ -258,7 +265,11 @@ } }, "gui_element": { - "enum": [ "SimpleText", "Textarea", "Richtext" ] + "enum": [ + "SimpleText", + "Textarea", + "Richtext" + ] } } } @@ -279,7 +290,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasColor"] + "enum": [ + "hasColor" + ] }, { "$ref": "#/definitions/prefixedname" @@ -309,7 +322,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -339,7 +354,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -369,7 +386,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -378,7 +397,10 @@ } }, "gui_element": { - "enum": ["Slider","SimpleText"] + "enum": [ + "Slider", + "SimpleText" + ] } } } @@ -399,7 +421,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasGeometry"] + "enum": [ + "hasGeometry" + ] }, { "$ref": "#/definitions/prefixedname" @@ -432,7 +456,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -441,8 +467,7 @@ } }, "gui_element": { - "const": - "Geonames" + "const": "Geonames" } } } @@ -463,7 +488,10 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue", "seqnum"] + "enum": [ + "hasValue", + "seqnum" + ] }, { "$ref": "#/definitions/prefixedname" @@ -496,7 +524,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -526,7 +556,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -556,7 +588,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -590,7 +624,9 @@ "type": "string", "oneOf": [ { - "enum": ["hasValue"] + "enum": [ + "hasValue" + ] }, { "$ref": "#/definitions/prefixedname" @@ -761,7 +797,10 @@ "if": { "properties": { "gui_element": { - "enum": ["Radio", "List"] + "enum": [ + "Radio", + "List" + ] } } }, @@ -775,7 +814,6 @@ } }, "additionalProperties": false - } }, "required": [ @@ -809,7 +847,15 @@ "if": { "properties": { "gui_element": { - "enum": ["Richtext", "Date", "TimeStamp", "Geometry", "Geonames", "Checkbox", "Interval"] + "enum": [ + "Richtext", + "Date", + "TimeStamp", + "Geometry", + "Geonames", + "Checkbox", + "Interval" + ] } } }, diff --git a/knora/dsplib/schemas/resources-only.json b/knora/dsplib/schemas/resources-only.json index 20a0b265a..06f803534 100644 --- a/knora/dsplib/schemas/resources-only.json +++ b/knora/dsplib/schemas/resources-only.json @@ -1,5 +1,5 @@ { - "$schema": "https://json-schema.org/draft/2020-12/schema", + "$schema": "https://json-schema.org/draft-07/schema", "$id": "https://dasch.swiss/schema/resources-only.json", "title": "JSON schema for resources used in DSP ontologies", "description": "JSON schema for the resources section used in DSP ontologies",