Skip to content

Commit

Permalink
refactor(json-schema): change JSON schema version to draft-07 (DEV-848)…
Browse files Browse the repository at this point in the history
… (#188)
  • Loading branch information
BalduinLandolt committed Apr 28, 2022
1 parent 9a5a50b commit 8ca6f87
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 45 deletions.
2 changes: 1 addition & 1 deletion 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",
Expand Down
2 changes: 1 addition & 1 deletion 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",
Expand Down
86 changes: 65 additions & 21 deletions 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",
Expand Down Expand Up @@ -434,7 +434,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasRepresentation"]
"enum": [
"hasRepresentation"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -464,7 +466,10 @@
"type": "string",
"oneOf": [
{
"enum": ["hasComment","hasValue"]
"enum": [
"hasComment",
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand All @@ -473,7 +478,11 @@
}
},
"gui_element": {
"enum": [ "SimpleText", "Textarea", "Richtext" ]
"enum": [
"SimpleText",
"Textarea",
"Richtext"
]
}
}
}
Expand All @@ -494,7 +503,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasColor"]
"enum": [
"hasColor"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -524,7 +535,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue"]
"enum": [
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -554,7 +567,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue"]
"enum": [
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -584,7 +599,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue"]
"enum": [
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand All @@ -593,7 +610,10 @@
}
},
"gui_element": {
"enum": ["Slider","SimpleText"]
"enum": [
"Slider",
"SimpleText"
]
}
}
}
Expand All @@ -614,7 +634,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasGeometry"]
"enum": [
"hasGeometry"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -647,7 +669,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue"]
"enum": [
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand All @@ -656,8 +680,7 @@
}
},
"gui_element": {
"const":
"Geonames"
"const": "Geonames"
}
}
}
Expand All @@ -678,7 +701,10 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue", "seqnum"]
"enum": [
"hasValue",
"seqnum"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -711,7 +737,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue"]
"enum": [
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -741,7 +769,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue"]
"enum": [
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -771,7 +801,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue"]
"enum": [
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -805,7 +837,9 @@
"type": "string",
"oneOf": [
{
"enum": ["hasValue"]
"enum": [
"hasValue"
]
},
{
"$ref": "#/definitions/prefixedname"
Expand Down Expand Up @@ -976,7 +1010,10 @@
"if": {
"properties": {
"gui_element": {
"enum": ["Radio", "List"]
"enum": [
"Radio",
"List"
]
}
}
},
Expand All @@ -990,7 +1027,6 @@
}
},
"additionalProperties": false

}
},
"required": [
Expand Down Expand Up @@ -1024,7 +1060,15 @@
"if": {
"properties": {
"gui_element": {
"enum": ["Richtext", "Date", "TimeStamp", "Geometry", "Geonames", "Checkbox", "Interval"]
"enum": [
"Richtext",
"Date",
"TimeStamp",
"Geometry",
"Geonames",
"Checkbox",
"Interval"
]
}
}
},
Expand Down

0 comments on commit 8ca6f87

Please sign in to comment.