{
  "$schema": "http://json-schema.org/draft-06/schema#",
  "title": "FilterResponse",
  "description": "FilterResponse PI_JSON",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "filters"
  ],
  "properties": {
    "version": {
      "type": "string",
      "description": "PI Version"
    },
    "filters": {
      "type": "array",
      "description": "Filters",
      "items": {
        "$ref": "#/definitions/Filter"
      }
    }
  },
  "definitions": {
    "BoundingBox": {
      "description": "Bounding box according to CRS EPSG:3857 Web Mercator format",
      "type": "object",
      "additionalProperties": false,
      "required": [
        "crs",
        "minx",
        "maxy",
        "maxx",
        "miny"
      ],
      "properties": {
        "crs": {
          "type": "string",
          "enum": ["EPSG:3857"]
        },
        "minx": {
          "type": "string"
        },
        "maxy": {
          "type": "string"
        },
        "maxx": {
          "type": "string"
        },
        "miny": {
          "type": "string"
        }
      }
    },
    "Filter": {
      "type": "object",
      "required": [
        "id", "name"
      ],
      "additionalProperties": false,
      "properties": {
        "id": {
          "type": "string",
          "description": "the id of the Filter"
        },
        "name": {
          "type": "string",
          "description": "The filter name"
        },
        "boundingBox": {
          "$ref": "#/definitions/BoundingBox"
        },
        "child": {
          "type": "array",
          "description": "Parameter Node Children",
          "items": {
            "$ref": "#/definitions/Filter"
          }
        }
      }
    }
  }
}
