2021-11-07 17:17:48 +01:00
{
2021-11-07 17:52:05 +01:00
"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"
2021-11-07 17:17:48 +01:00
} ,
2021-11-07 17:52:05 +01:00
{
"type" : "string"
2021-11-07 17:17:48 +01:00
}
]
2022-01-26 21:48:02 +01:00
} ,
2022-02-11 19:27:46 +01:00
"default" : {
"type" : "boolean"
} ,
2022-01-26 21:48:02 +01:00
"fields" : {
"type" : "array" ,
"items" : {
"type" : "object" ,
"properties" : {
"name" : {
2022-04-30 01:53:59 +02:00
"description" : "If name is `search`, use \"_first_comment~.*{search}.*\" as osmTags" ,
2022-01-26 21:48:02 +01:00
"type" : "string"
} ,
"type" : {
"type" : "string"
}
} ,
"required" : [
"name"
]
}
2021-11-07 17:52:05 +01:00
}
} ,
"required" : [
"question"
]
}
}
} ,
"required" : [
"id" ,
"options"
] ,
"definitions" : {
2021-11-07 17:17:48 +01:00
"AndOrTagConfigJson" : {
"type" : "object" ,
"properties" : {
"and" : {
"type" : "array" ,
"items" : {
"anyOf" : [
{
2021-11-07 17:52:05 +01:00
"$ref" : "#/definitions/AndOrTagConfigJson"
2021-11-07 17:17:48 +01:00
} ,
{
2021-11-07 17:52:05 +01:00
"type" : "string"
2021-11-07 17:17:48 +01:00
}
]
}
} ,
"or" : {
"type" : "array" ,
"items" : {
"anyOf" : [
{
2021-11-07 17:52:05 +01:00
"$ref" : "#/definitions/AndOrTagConfigJson"
2021-11-07 17:17:48 +01:00
} ,
{
2021-11-07 17:52:05 +01:00
"type" : "string"
2021-11-07 17:17:48 +01:00
}
]
}
}
2021-11-07 17:52:05 +01:00
} ,
"additionalProperties" : false
2021-11-07 17:17:48 +01:00
}
} ,
2021-11-07 17:52:05 +01:00
"$schema" : "http://json-schema.org/draft-07/schema#" ,
2021-11-07 17:17:48 +01:00
"additionalProperties" : false
}