Add JSON-schema files

This commit is contained in:
Pieter Vander Vennet 2021-11-07 17:52:05 +01:00
parent 1511b0a167
commit 8e8340c7fe
25 changed files with 5632 additions and 5067 deletions

View file

@ -1,50 +1,39 @@
export default {
"$schema": "http://json-schema.org/draft-07/schema#",
"$ref": "#/definitions/FilterConfigJson",
"definitions": {
"FilterConfigJson": {
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "An id/name for this filter, used to set the URL parameters"
},
"options": {
"type": "array",
"items": {
"type": "object",
"properties": {
"question": {
"anyOf": [
{
"type": "string"
},
{}
]
},
"osmTags": {
"anyOf": [
{
"$ref": "#/definitions/AndOrTagConfigJson"
},
{
"type": "string"
}
]
}
},
"required": [
"question"
]
},
"description": "The options for a filter If there are multiple options these will be a list of radio buttons If there is only one option this will be a checkbox Filtering is done based on the given osmTags that are compared to the objects in that layer."
}
},
"required": [
"id",
"options"
]
"type": "object",
"properties": {
"id": {
"description": "An id/name for this filter, used to set the URL parameters",
"type": "string"
},
"options": {
"description": "The options for a filter\nIf there are multiple options these will be a list of radio buttons\nIf there is only one option this will be a checkbox\nFiltering is done based on the given osmTags that are compared to the objects in that layer.",
"type": "array",
"items": {
"type": "object",
"properties": {
"question": {},
"osmTags": {
"anyOf": [
{
"$ref": "#/definitions/AndOrTagConfigJson"
},
{
"type": "string"
}
]
}
},
"required": [
"question"
]
}
}
},
"required": [
"id",
"options"
],
"definitions": {
"AndOrTagConfigJson": {
"type": "object",
"properties": {
@ -53,10 +42,10 @@ export default {
"items": {
"anyOf": [
{
"type": "string"
"$ref": "#/definitions/AndOrTagConfigJson"
},
{
"$ref": "#/definitions/AndOrTagConfigJson"
"type": "string"
}
]
}
@ -66,15 +55,16 @@ export default {
"items": {
"anyOf": [
{
"type": "string"
"$ref": "#/definitions/AndOrTagConfigJson"
},
{
"$ref": "#/definitions/AndOrTagConfigJson"
"type": "string"
}
]
}
}
}
}
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}