{
  "openapi": "3.1.0",
  "info": {
    "title": "DatováMapa – API portálu",
    "version": "0.1",
    "description": "Katalog dat, sjednocená data všech poskytovatelů, dotazy na místo (co je v bodě a okolí, souhrn za obec) a validátor protokolu. Dokumentace: https://datovamapa.cz/dokumentace/api.md, návod pro AI asistenty: https://datovamapa.cz/dokumentace/ai-asistenti.md"
  },
  "servers": [
    {
      "url": "https://datovamapa.cz"
    }
  ],
  "externalDocs": {
    "url": "https://datovamapa.cz/llms.txt",
    "description": "Rozcestník dokumentace pro jazykové modely"
  },
  "paths": {
    "/api/katalog": {
      "get": {
        "operationId": "katalog",
        "summary": "Všichni poskytovatelé a datové sady",
        "responses": {
          "200": {
            "description": "Katalog",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/data/{provider}/{dataset}": {
      "get": {
        "operationId": "nacistData",
        "summary": "Data datové sady jako GeoJSON (přes cache portálu)",
        "description": "Další query parametry podle `params` sady v katalogu. Údaje z feature.dm jsou v properties s prefixem __dm_.",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "bbox",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "16.5,49.1,16.7,49.3"
            },
            "description": "minLon,minLat,maxLon,maxLat; povinné u sad s mode bbox"
          },
          {
            "name": "zoom",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 0,
              "maximum": 24
            },
            "description": "Povinné u sad s mode bbox"
          },
          {
            "name": "cursor",
            "in": "query",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "GeoJSON FeatureCollection",
            "headers": {
              "X-DM-Cache": {
                "schema": {
                  "type": "string",
                  "enum": [
                    "hit",
                    "miss",
                    "stale"
                  ]
                }
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "type": {
                      "type": "string",
                      "const": "FeatureCollection"
                    },
                    "features": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "type": {
                            "type": "string",
                            "const": "Feature"
                          },
                          "id": {
                            "anyOf": [
                              {
                                "type": "string",
                                "maxLength": 200
                              },
                              {
                                "type": "number"
                              }
                            ]
                          },
                          "geometry": {
                            "anyOf": [
                              {
                                "oneOf": [
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "Point"
                                      },
                                      "coordinates": {
                                        "minItems": 2,
                                        "maxItems": 3,
                                        "type": "array",
                                        "items": {
                                          "type": "number"
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "coordinates"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "MultiPoint"
                                      },
                                      "coordinates": {
                                        "type": "array",
                                        "items": {
                                          "minItems": 2,
                                          "maxItems": 3,
                                          "type": "array",
                                          "items": {
                                            "type": "number"
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "coordinates"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "LineString"
                                      },
                                      "coordinates": {
                                        "minItems": 2,
                                        "type": "array",
                                        "items": {
                                          "minItems": 2,
                                          "maxItems": 3,
                                          "type": "array",
                                          "items": {
                                            "type": "number"
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "coordinates"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "MultiLineString"
                                      },
                                      "coordinates": {
                                        "type": "array",
                                        "items": {
                                          "minItems": 2,
                                          "type": "array",
                                          "items": {
                                            "minItems": 2,
                                            "maxItems": 3,
                                            "type": "array",
                                            "items": {
                                              "type": "number"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "coordinates"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "Polygon"
                                      },
                                      "coordinates": {
                                        "type": "array",
                                        "items": {
                                          "minItems": 4,
                                          "type": "array",
                                          "items": {
                                            "minItems": 2,
                                            "maxItems": 3,
                                            "type": "array",
                                            "items": {
                                              "type": "number"
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "coordinates"
                                    ]
                                  },
                                  {
                                    "type": "object",
                                    "properties": {
                                      "type": {
                                        "type": "string",
                                        "const": "MultiPolygon"
                                      },
                                      "coordinates": {
                                        "type": "array",
                                        "items": {
                                          "type": "array",
                                          "items": {
                                            "minItems": 4,
                                            "type": "array",
                                            "items": {
                                              "minItems": 2,
                                              "maxItems": 3,
                                              "type": "array",
                                              "items": {
                                                "type": "number"
                                              }
                                            }
                                          }
                                        }
                                      }
                                    },
                                    "required": [
                                      "type",
                                      "coordinates"
                                    ]
                                  }
                                ]
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "properties": {
                            "default": {},
                            "anyOf": [
                              {
                                "type": "object",
                                "propertyNames": {
                                  "type": "string"
                                },
                                "additionalProperties": {}
                              },
                              {
                                "type": "null"
                              }
                            ]
                          },
                          "dm": {
                            "type": "object",
                            "properties": {
                              "title": {
                                "description": "Nadpis objektu v detailu",
                                "type": "string",
                                "maxLength": 200
                              },
                              "description": {
                                "type": "string",
                                "maxLength": 2000
                              },
                              "url": {
                                "description": "Odkaz na detail objektu u poskytovatele",
                                "type": "string",
                                "format": "uri"
                              },
                              "color": {
                                "description": "Přepíše barvu z prezentace",
                                "type": "string",
                                "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                              },
                              "chart": {
                                "description": "Graf vývoje hodnoty v detailu objektu",
                                "type": "object",
                                "properties": {
                                  "label": {
                                    "type": "string",
                                    "minLength": 1,
                                    "maxLength": 80,
                                    "description": "Co graf ukazuje, např. Počet obyvatel"
                                  },
                                  "unit": {
                                    "type": "string",
                                    "maxLength": 20
                                  },
                                  "decimals": {
                                    "type": "integer",
                                    "minimum": 0,
                                    "maximum": 6
                                  },
                                  "note": {
                                    "description": "Poznámka pod grafem, např. o změně metodiky",
                                    "type": "string",
                                    "maxLength": 200
                                  },
                                  "highlight": {
                                    "description": "Zvýrazněné období (např. zvolené v časovém filtru) – portál ho podbarví, ukáže hodnotu na jeho konci a změnu i trend počítá od jeho začátku. Stejné from a to = jedno zvolené období (např. rok).",
                                    "type": "object",
                                    "properties": {
                                      "from": {
                                        "type": "string",
                                        "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                                        "description": "Rok, měsíc nebo den v ISO 8601"
                                      },
                                      "to": {
                                        "type": "string",
                                        "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                                        "description": "Rok, měsíc nebo den v ISO 8601"
                                      }
                                    },
                                    "required": [
                                      "from",
                                      "to"
                                    ]
                                  },
                                  "points": {
                                    "minItems": 2,
                                    "maxItems": 100,
                                    "type": "array",
                                    "items": {
                                      "type": "object",
                                      "properties": {
                                        "period": {
                                          "type": "string",
                                          "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                                          "description": "Rok, měsíc nebo den v ISO 8601"
                                        },
                                        "value": {
                                          "type": "number"
                                        }
                                      },
                                      "required": [
                                        "period",
                                        "value"
                                      ]
                                    },
                                    "description": "Hodnoty seřazené od nejstaršího období"
                                  }
                                },
                                "required": [
                                  "label",
                                  "points"
                                ]
                              }
                            }
                          }
                        },
                        "required": [
                          "type",
                          "geometry"
                        ]
                      }
                    },
                    "dm": {
                      "type": "object",
                      "properties": {
                        "protocol": {
                          "type": "string"
                        },
                        "generated": {
                          "description": "Kdy byla odpověď vytvořena (ISO 8601)",
                          "type": "string",
                          "maxLength": 40
                        },
                        "ttl": {
                          "description": "Jak dlouho (s) je odpověď platná",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "total": {
                          "description": "Celkový počet objektů odpovídajících dotazu",
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 9007199254740991
                        },
                        "truncated": {
                          "description": "Odpověď neobsahuje všechny objekty (limit)",
                          "type": "boolean"
                        },
                        "next": {
                          "description": "Kurzor pro další stránku",
                          "type": "string",
                          "maxLength": 500
                        },
                        "notice": {
                          "description": "Krátké sdělení pro uživatele, např. přibližte mapu",
                          "type": "string",
                          "maxLength": 300
                        },
                        "timeline": {
                          "description": "Počty objektů ve výřezu po obdobích za celou dobu, kterou sada pokrývá – nezávisle na zvoleném období a limitu. Portál z nich kreslí graf u legendy.",
                          "maxItems": 400,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string",
                                "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                                "description": "Rok, měsíc nebo den v ISO 8601"
                              },
                              "count": {
                                "type": "integer",
                                "minimum": 0,
                                "maximum": 9007199254740991
                              },
                              "values": {
                                "description": "Rozpad počtu podle hodnot vlastnosti, podle které se objekty barví (color.field) – graf je obarví jako legendu",
                                "type": "object",
                                "propertyNames": {
                                  "type": "string",
                                  "maxLength": 100
                                },
                                "additionalProperties": {
                                  "type": "integer",
                                  "minimum": 0,
                                  "maximum": 9007199254740991
                                }
                              }
                            },
                            "required": [
                              "period",
                              "count"
                            ]
                          }
                        },
                        "chart": {
                          "description": "Souhrnný vývoj hodnoty za celé území sady nebo výřez (např. počet obyvatel Česka) – portál ho ukáže u časového filtru, když odpověď neposílá dm.timeline",
                          "type": "object",
                          "properties": {
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 80,
                              "description": "Co graf ukazuje, např. Počet obyvatel"
                            },
                            "unit": {
                              "type": "string",
                              "maxLength": 20
                            },
                            "decimals": {
                              "type": "integer",
                              "minimum": 0,
                              "maximum": 6
                            },
                            "note": {
                              "description": "Poznámka pod grafem, např. o změně metodiky",
                              "type": "string",
                              "maxLength": 200
                            },
                            "highlight": {
                              "description": "Zvýrazněné období (např. zvolené v časovém filtru) – portál ho podbarví, ukáže hodnotu na jeho konci a změnu i trend počítá od jeho začátku. Stejné from a to = jedno zvolené období (např. rok).",
                              "type": "object",
                              "properties": {
                                "from": {
                                  "type": "string",
                                  "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                                  "description": "Rok, měsíc nebo den v ISO 8601"
                                },
                                "to": {
                                  "type": "string",
                                  "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                                  "description": "Rok, měsíc nebo den v ISO 8601"
                                }
                              },
                              "required": [
                                "from",
                                "to"
                              ]
                            },
                            "points": {
                              "minItems": 2,
                              "maxItems": 100,
                              "type": "array",
                              "items": {
                                "type": "object",
                                "properties": {
                                  "period": {
                                    "type": "string",
                                    "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                                    "description": "Rok, měsíc nebo den v ISO 8601"
                                  },
                                  "value": {
                                    "type": "number"
                                  }
                                },
                                "required": [
                                  "period",
                                  "value"
                                ]
                              },
                              "description": "Hodnoty seřazené od nejstaršího období"
                            }
                          },
                          "required": [
                            "label",
                            "points"
                          ]
                        }
                      }
                    }
                  },
                  "required": [
                    "type",
                    "features"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "Neplatný dotaz",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Neznámá datová sada",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Chyba zdroje dat",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/misto": {
      "get": {
        "operationId": "najitMisto",
        "summary": "Hledání adresy, ulice nebo obce v RÚIAN → souřadnice [lon, lat]",
        "parameters": [
          {
            "name": "dotaz",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "maxLength": 100,
              "example": "Thámova 7, Praha"
            }
          },
          {
            "name": "max",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10,
              "default": 5
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Nalezená místa; municipality = obec nad 10 000 obyvatel se souhrny dat",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "query": {
                      "type": "string"
                    },
                    "count": {
                      "type": "integer"
                    },
                    "places": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Place"
                      }
                    },
                    "attribution": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Chybí dotaz",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Vyhledávání RÚIAN selhalo",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/okoli": {
      "get": {
        "operationId": "vOkoli",
        "summary": "Co je v bodě a okolí z vybraných datových sad",
        "description": "GeoJSON sady: objekty do vzdálenosti polomer seřazené od nejbližšího (distance v metrech, 0 = bod uvnitř plochy). Rastrové sady: prvky přímo v bodě (WMS GetFeatureInfo / ArcGIS identify). status ok s prázdnými hits = nic tu není, nelze = sada hodnotu v bodě neposkytuje. Jedno z sady, ucel, hledat je povinné. Parametry sad: {provider}/{dataset}.{param}=hodnota.",
        "parameters": [
          {
            "name": "bod",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "14.4527,50.0914"
            },
            "description": "lon,lat ve WGS84"
          },
          {
            "name": "misto",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "Thámova 7, Praha"
            },
            "description": "Místo bodu: adresa nebo název (první nález hledání místa)"
          },
          {
            "name": "polomer",
            "in": "query",
            "schema": {
              "type": "number",
              "minimum": 1,
              "maximum": 20000,
              "default": 500
            },
            "description": "Poloměr okolí v metrech"
          },
          {
            "name": "sady",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "vuv/zaplavova-uzemi,cgs/radon"
            },
            "description": "Klíče provider/dataset oddělené čárkou, nejvýš 12"
          },
          {
            "name": "ucel",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "stavba",
                "bydleni",
                "koupe-pozemku",
                "zemedelstvi",
                "investice",
                "doprava",
                "turistika",
                "podnikani",
                "verejna-sprava"
              ]
            },
            "description": "Sady s tímto účelem, které bod pokrývají"
          },
          {
            "name": "hledat",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Sady podle shody s textem"
          },
          {
            "name": "max",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 5
            },
            "description": "Nejvýš objektů na sadu"
          }
        ],
        "responses": {
          "200": {
            "description": "Výsledky po sadách",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PointAnswer"
                }
              }
            }
          },
          "400": {
            "description": "Neplatný dotaz",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Místo se nepodařilo najít",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/souhrn/{provider}/{dataset}": {
      "get": {
        "operationId": "souhrn",
        "summary": "Souhrn GeoJSON sady za celé území nebo za obec nad 10 000 obyvatel",
        "description": "Počet objektů, kategorie, nejvyšší a nejnižší hodnoty, u kartogramu hodnoty plochy obce (own). Další query parametry jsou parametry sady.",
        "parameters": [
          {
            "name": "provider",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "dataset",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "obec",
            "in": "query",
            "schema": {
              "type": "string",
              "example": "Ostrava"
            },
            "description": "Název nebo slug obce"
          }
        ],
        "responses": {
          "200": {
            "description": "Souhrn",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Rastrová sada nebo sada jen pro přiblížení (zadejte obec)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "404": {
            "description": "Neznámá sada nebo obec",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "502": {
            "description": "Chyba zdroje dat",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/validovat": {
      "get": {
        "operationId": "zivyTestPoskytovatele",
        "summary": "Živý test: stáhne manifest a pošle testovací dotaz na každou sadu",
        "parameters": [
          {
            "name": "manifestUrl",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uri"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          },
          "400": {
            "description": "Chybí manifestUrl",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      },
      "post": {
        "operationId": "validovat",
        "summary": "Kontrola manifestu nebo dat bez zveřejnění",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/Manifest"
                  },
                  {
                    "$ref": "#/components/schemas/DataResponse"
                  },
                  {
                    "type": "object",
                    "required": [
                      "manifest"
                    ],
                    "properties": {
                      "manifest": {
                        "$ref": "#/components/schemas/Manifest"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "data"
                    ],
                    "properties": {
                      "data": {
                        "$ref": "#/components/schemas/DataResponse"
                      },
                      "dataset": {
                        "type": "object",
                        "description": "Datová sada z manifestu"
                      }
                    }
                  },
                  {
                    "type": "object",
                    "required": [
                      "manifestUrl"
                    ],
                    "properties": {
                      "manifestUrl": {
                        "type": "string",
                        "format": "uri"
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Report",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Report"
                }
              }
            }
          },
          "400": {
            "description": "Neplatný vstup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/api/registrace": {
      "post": {
        "operationId": "registrovatPoskytovatele",
        "summary": "Registrace poskytovatele: živý test manifestu a zařazení mezi neschválená data",
        "description": "Data jsou po registraci dostupná jen na stránkách sad s varováním; do katalogu se dostanou po schválení provozovatelem. Schválení platí pro konkrétní obsah manifestu.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "manifestUrl"
                ],
                "properties": {
                  "manifestUrl": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Už registrováno (stav v poli status)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "201": {
            "description": "Registrováno, čeká na schválení",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "description": "Neplatný vstup",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "403": {
            "description": "Registrace byla zamítnuta",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "409": {
            "description": "Id nebo URL manifestu už je registrované",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "422": {
            "description": "Manifest neprošel živým testem (report v poli check)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "429": {
            "description": "Příliš mnoho požadavků nebo plná fronta ke schválení",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          },
          "503": {
            "description": "Registrace není dostupná",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                }
              }
            }
          }
        }
      }
    },
    "/dokumentace/pro-ai-agenty.md": {
      "get": {
        "operationId": "dokumentace_pro_ai_agenty",
        "summary": "Návod pro AI agenty",
        "description": "Postup krok za krokem, pravidla, šablony kódu a kritéria hotové práce pro agenta, který připravuje data poskytovatele.",
        "responses": {
          "200": {
            "description": "Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/dokumentace/ai-asistenti.md": {
      "get": {
        "operationId": "dokumentace_ai_asistenti",
        "summary": "Data pro AI asistenty",
        "description": "Jak připojit DatovouMapu k AI asistentovi (MCP, HTTP API) a ptát se na místa a data: záplavy, radon, hluk, ovzduší, obce.",
        "responses": {
          "200": {
            "description": "Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/dokumentace/pro-poskytovatele.md": {
      "get": {
        "operationId": "dokumentace_pro_poskytovatele",
        "summary": "Pro poskytovatele dat",
        "description": "Jak připojit data: statické soubory, vlastní endpoint nebo WMS; manifest, data, vizualizace, ověření, podmínky.",
        "responses": {
          "200": {
            "description": "Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/dokumentace/protokol.md": {
      "get": {
        "operationId": "dokumentace_protokol",
        "summary": "Protokol 0.1",
        "description": "Normativní specifikace manifestu, datového dotazu, odpovědi a cache.",
        "responses": {
          "200": {
            "description": "Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/dokumentace/api.md": {
      "get": {
        "operationId": "dokumentace_api",
        "summary": "API portálu a MCP server",
        "description": "Katalog, data, validátor, MCP nástroje, odkazy na mapu a kódy nálezů.",
        "responses": {
          "200": {
            "description": "Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    },
    "/dokumentace/o-projektu.md": {
      "get": {
        "operationId": "dokumentace_o_projektu",
        "summary": "O projektu",
        "description": "Vize DatovéMapy, principy a plán rozvoje.",
        "responses": {
          "200": {
            "description": "Markdown",
            "content": {
              "text/markdown": {
                "schema": {
                  "type": "string"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "Manifest": {
        "type": "object",
        "properties": {
          "$schema": {
            "type": "string"
          },
          "protocol": {
            "type": "string",
            "pattern": "^\\d+\\.\\d+$",
            "description": "Verze protokolu, podle které je manifest napsán, např. 0.1"
          },
          "provider": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
                "examples": [
                  "mesto-brno",
                  "kontejnery-na-odpad"
                ]
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "description": {
                "type": "string",
                "maxLength": 1000
              },
              "homepage": {
                "type": "string",
                "format": "uri"
              },
              "logo": {
                "type": "string",
                "format": "uri"
              },
              "contact": {
                "type": "object",
                "properties": {
                  "email": {
                    "type": "string",
                    "format": "email",
                    "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"
                  },
                  "url": {
                    "type": "string",
                    "format": "uri"
                  }
                }
              },
              "managedBy": {
                "default": "provider",
                "description": "portal = manifest pro veřejnou službu udržuje DatováMapa, ne vlastník dat",
                "type": "string",
                "enum": [
                  "provider",
                  "portal"
                ]
              }
            },
            "required": [
              "id",
              "name"
            ]
          },
          "license": {
            "description": "Výchozí licence pro všechny datové sady",
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "description": "Název licence, např. CC BY 4.0"
              },
              "url": {
                "type": "string",
                "format": "uri"
              },
              "attribution": {
                "type": "string",
                "minLength": 1,
                "maxLength": 300,
                "description": "Text atribuce, který portál zobrazí u mapy, např. © Česká geologická služba"
              }
            },
            "required": [
              "name",
              "attribution"
            ]
          },
          "datasets": {
            "minItems": 1,
            "maxItems": 200,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9](?:[a-z0-9-]{0,62}[a-z0-9])?$",
                  "examples": [
                    "mesto-brno",
                    "kontejnery-na-odpad"
                  ]
                },
                "title": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "description": {
                  "type": "string",
                  "maxLength": 1000
                },
                "category": {
                  "description": "Doporučené hodnoty: uzemi, priroda, voda, rizika, energie, doprava, spolecnost, ekonomika, infrastruktura, ukazka, ostatni",
                  "type": "string",
                  "maxLength": 40
                },
                "tags": {
                  "maxItems": 30,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 40
                  }
                },
                "keywords": {
                  "description": "Slova a synonyma, podle kterých sadu najde uživatel i AI asistent portálu. Pište česky, i hovorové tvary.",
                  "examples": [
                    [
                      "odpad",
                      "kontejner",
                      "třídění",
                      "popelnice"
                    ]
                  ],
                  "maxItems": 60,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 60
                  }
                },
                "useCases": {
                  "description": "Pro jaké účely je sada užitečná. Doporučené hodnoty: stavba, bydleni, koupe-pozemku, zemedelstvi, investice, doprava, turistika, podnikani, verejna-sprava; jiné jsou povolené.",
                  "examples": [
                    [
                      "stavba",
                      "bydleni"
                    ]
                  ],
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "string",
                    "maxLength": 60
                  }
                },
                "coverage": {
                  "type": "object",
                  "properties": {
                    "bbox": {
                      "type": "array",
                      "prefixItems": [
                        {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        {
                          "type": "number",
                          "minimum": -90,
                          "maximum": 90
                        },
                        {
                          "type": "number",
                          "minimum": -180,
                          "maximum": 180
                        },
                        {
                          "type": "number",
                          "minimum": -90,
                          "maximum": 90
                        }
                      ],
                      "items": false,
                      "minItems": 4,
                      "maxItems": 4,
                      "description": "[minLon, minLat, maxLon, maxLat] ve WGS84"
                    },
                    "area": {
                      "description": "Slovní popis pokrytí, např. Česko, Jihomoravský kraj",
                      "type": "string",
                      "maxLength": 60
                    },
                    "minZoom": {
                      "description": "Pod tímto přiblížením portál data nenačítá",
                      "type": "number",
                      "minimum": 0,
                      "maximum": 24
                    },
                    "maxZoom": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 24
                    }
                  }
                },
                "temporal": {
                  "type": "object",
                  "properties": {
                    "updated": {
                      "description": "Datum poslední aktualizace dat (ISO 8601)",
                      "type": "string",
                      "maxLength": 40
                    },
                    "frequency": {
                      "description": "Jak často se data mění, např. denně",
                      "type": "string",
                      "maxLength": 60
                    },
                    "param": {
                      "description": "Klíč parametru, kterým uživatel volí období (typ range v letech, nebo date-range). Portál ho ukáže jako časový filtr u legendy, s grafem z dm.timeline.",
                      "type": "string",
                      "maxLength": 32
                    }
                  }
                },
                "license": {
                  "description": "Přepisuje licenci poskytovatele",
                  "type": "object",
                  "properties": {
                    "name": {
                      "type": "string",
                      "minLength": 1,
                      "description": "Název licence, např. CC BY 4.0"
                    },
                    "url": {
                      "type": "string",
                      "format": "uri"
                    },
                    "attribution": {
                      "type": "string",
                      "minLength": 1,
                      "maxLength": 300,
                      "description": "Text atribuce, který portál zobrazí u mapy, např. © Česká geologická služba"
                    }
                  },
                  "required": [
                    "name",
                    "attribution"
                  ]
                },
                "source": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "geojson"
                        },
                        "url": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 2048,
                          "description": "Endpoint vracející FeatureCollection; může být relativní vůči manifestu",
                          "examples": [
                            "https://data.example.cz/datovamapa/kontejnery",
                            "kontejnery.geojson"
                          ]
                        },
                        "mode": {
                          "default": "full",
                          "description": "full = celá sada jedním dotazem, bbox = portál se ptá na aktuální výřez mapy",
                          "type": "string",
                          "enum": [
                            "full",
                            "bbox"
                          ]
                        },
                        "maxFeatures": {
                          "description": "Kolik objektů poskytovatel vrátí nanejvýš; portál posílá jako limit",
                          "type": "integer",
                          "minimum": 1,
                          "maximum": 5000
                        }
                      },
                      "required": [
                        "type",
                        "url"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "raster"
                        },
                        "tiles": {
                          "minItems": 1,
                          "maxItems": 4,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^https:\\/\\/\\S+$"
                          },
                          "description": "Šablony URL s {z}/{x}/{y} nebo {bbox-epsg-3857}"
                        },
                        "tileSize": {
                          "default": 256,
                          "anyOf": [
                            {
                              "type": "number",
                              "const": 256
                            },
                            {
                              "type": "number",
                              "const": 512
                            }
                          ]
                        },
                        "minZoom": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 24
                        },
                        "maxZoom": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 24
                        }
                      },
                      "required": [
                        "type",
                        "tiles"
                      ]
                    }
                  ]
                },
                "presentation": {
                  "oneOf": [
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "circle"
                        },
                        "color": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "categorical"
                                },
                                "values": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string",
                                    "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                  },
                                  "description": "Hodnota vlastnosti → barva"
                                },
                                "default": {
                                  "type": "string",
                                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "values"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "interpolate"
                                },
                                "stops": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  },
                                  "description": "Seřazené dvojice [hodnota, barva]"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "stops"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "step"
                                },
                                "default": {
                                  "type": "string",
                                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
                                  "description": "Barva pro hodnoty pod první zarážkou"
                                },
                                "stops": {
                                  "minItems": 1,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  },
                                  "description": "Seřazené dvojice [od hodnoty, barva]"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "default",
                                "stops"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "trend"
                                },
                                "threshold": {
                                  "description": "Průměrná změna za jedno období grafu v % počáteční hodnoty, pod kterou hodnota stagnuje (výchozí 0,5)",
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 100
                                },
                                "colors": {
                                  "description": "Přepíše výchozí barvy (roste zelená, stagnuje šedá, klesá červená) – např. když je růst nežádoucí",
                                  "type": "object",
                                  "properties": {
                                    "up": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    },
                                    "flat": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    },
                                    "down": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    }
                                  }
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "radius": {
                          "description": "Poloměr v pixelech",
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "interpolate"
                                },
                                "stops": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  }
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "stops"
                              ]
                            }
                          ]
                        },
                        "opacity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "strokeColor": {
                          "type": "string",
                          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                        },
                        "strokeWidth": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "label": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "Vlastnost, jejíž hodnota se zobrazí jako popisek"
                            },
                            "minZoom": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 24
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                            },
                            "size": {
                              "type": "number",
                              "minimum": 6,
                              "maximum": 32
                            }
                          },
                          "required": [
                            "field"
                          ]
                        },
                        "cluster": {
                          "description": "Seskupování blízkých bodů",
                          "anyOf": [
                            {
                              "type": "boolean"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "radius": {
                                  "type": "number",
                                  "minimum": 10,
                                  "maximum": 200
                                },
                                "maxZoom": {
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 20
                                }
                              }
                            }
                          ]
                        },
                        "legend": {
                          "description": "Vlastní legenda; jinak ji portál odvodí z barev",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 80
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                              }
                            },
                            "required": [
                              "label",
                              "color"
                            ]
                          }
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "heatmap"
                        },
                        "weight": {
                          "description": "Váha bodu, typicky z číselné vlastnosti",
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "interpolate"
                                },
                                "stops": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  }
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "stops"
                              ]
                            }
                          ]
                        },
                        "radius": {
                          "type": "number",
                          "minimum": 1,
                          "maximum": 100
                        },
                        "intensity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "colors": {
                          "description": "Barevná škála od nízké po vysokou hustotu",
                          "minItems": 2,
                          "maxItems": 10,
                          "type": "array",
                          "items": {
                            "type": "string",
                            "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                          }
                        },
                        "opacity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "legend": {
                          "description": "Vlastní legenda; jinak ji portál odvodí z barev",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 80
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                              }
                            },
                            "required": [
                              "label",
                              "color"
                            ]
                          }
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "line"
                        },
                        "color": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "categorical"
                                },
                                "values": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string",
                                    "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                  },
                                  "description": "Hodnota vlastnosti → barva"
                                },
                                "default": {
                                  "type": "string",
                                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "values"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "interpolate"
                                },
                                "stops": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  },
                                  "description": "Seřazené dvojice [hodnota, barva]"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "stops"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "step"
                                },
                                "default": {
                                  "type": "string",
                                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
                                  "description": "Barva pro hodnoty pod první zarážkou"
                                },
                                "stops": {
                                  "minItems": 1,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  },
                                  "description": "Seřazené dvojice [od hodnoty, barva]"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "default",
                                "stops"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "trend"
                                },
                                "threshold": {
                                  "description": "Průměrná změna za jedno období grafu v % počáteční hodnoty, pod kterou hodnota stagnuje (výchozí 0,5)",
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 100
                                },
                                "colors": {
                                  "description": "Přepíše výchozí barvy (roste zelená, stagnuje šedá, klesá červená) – např. když je růst nežádoucí",
                                  "type": "object",
                                  "properties": {
                                    "up": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    },
                                    "flat": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    },
                                    "down": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    }
                                  }
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "width": {
                          "anyOf": [
                            {
                              "type": "number",
                              "minimum": 0
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "interpolate"
                                },
                                "stops": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "number",
                                        "minimum": 0
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  }
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "stops"
                              ]
                            }
                          ]
                        },
                        "opacity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "dash": {
                          "minItems": 2,
                          "maxItems": 8,
                          "type": "array",
                          "items": {
                            "type": "number",
                            "minimum": 0
                          }
                        },
                        "label": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "Vlastnost, jejíž hodnota se zobrazí jako popisek"
                            },
                            "minZoom": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 24
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                            },
                            "size": {
                              "type": "number",
                              "minimum": 6,
                              "maximum": 32
                            }
                          },
                          "required": [
                            "field"
                          ]
                        },
                        "legend": {
                          "description": "Vlastní legenda; jinak ji portál odvodí z barev",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 80
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                              }
                            },
                            "required": [
                              "label",
                              "color"
                            ]
                          }
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "fill"
                        },
                        "color": {
                          "anyOf": [
                            {
                              "type": "string",
                              "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "categorical"
                                },
                                "values": {
                                  "type": "object",
                                  "propertyNames": {
                                    "type": "string"
                                  },
                                  "additionalProperties": {
                                    "type": "string",
                                    "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                  },
                                  "description": "Hodnota vlastnosti → barva"
                                },
                                "default": {
                                  "type": "string",
                                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "values"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "interpolate"
                                },
                                "stops": {
                                  "minItems": 2,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  },
                                  "description": "Seřazené dvojice [hodnota, barva]"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "stops"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "field": {
                                  "type": "string",
                                  "minLength": 1,
                                  "maxLength": 64
                                },
                                "type": {
                                  "type": "string",
                                  "const": "step"
                                },
                                "default": {
                                  "type": "string",
                                  "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$",
                                  "description": "Barva pro hodnoty pod první zarážkou"
                                },
                                "stops": {
                                  "minItems": 1,
                                  "type": "array",
                                  "items": {
                                    "type": "array",
                                    "prefixItems": [
                                      {
                                        "type": "number"
                                      },
                                      {
                                        "type": "string",
                                        "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                      }
                                    ],
                                    "items": false,
                                    "minItems": 2,
                                    "maxItems": 2
                                  },
                                  "description": "Seřazené dvojice [od hodnoty, barva]"
                                }
                              },
                              "required": [
                                "field",
                                "type",
                                "default",
                                "stops"
                              ]
                            },
                            {
                              "type": "object",
                              "properties": {
                                "type": {
                                  "type": "string",
                                  "const": "trend"
                                },
                                "threshold": {
                                  "description": "Průměrná změna za jedno období grafu v % počáteční hodnoty, pod kterou hodnota stagnuje (výchozí 0,5)",
                                  "type": "number",
                                  "minimum": 0,
                                  "maximum": 100
                                },
                                "colors": {
                                  "description": "Přepíše výchozí barvy (roste zelená, stagnuje šedá, klesá červená) – např. když je růst nežádoucí",
                                  "type": "object",
                                  "properties": {
                                    "up": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    },
                                    "flat": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    },
                                    "down": {
                                      "type": "string",
                                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                                    }
                                  }
                                }
                              },
                              "required": [
                                "type"
                              ]
                            }
                          ]
                        },
                        "opacity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "outlineColor": {
                          "type": "string",
                          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                        },
                        "outlineWidth": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 10
                        },
                        "label": {
                          "type": "object",
                          "properties": {
                            "field": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 64,
                              "description": "Vlastnost, jejíž hodnota se zobrazí jako popisek"
                            },
                            "minZoom": {
                              "type": "number",
                              "minimum": 0,
                              "maximum": 24
                            },
                            "color": {
                              "type": "string",
                              "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                            },
                            "size": {
                              "type": "number",
                              "minimum": 6,
                              "maximum": 32
                            }
                          },
                          "required": [
                            "field"
                          ]
                        },
                        "legend": {
                          "description": "Vlastní legenda; jinak ji portál odvodí z barev",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 80
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                              }
                            },
                            "required": [
                              "label",
                              "color"
                            ]
                          }
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "raster"
                        },
                        "opacity": {
                          "type": "number",
                          "minimum": 0,
                          "maximum": 1
                        },
                        "legend": {
                          "description": "Vlastní legenda; jinak ji portál odvodí z barev",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 80
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                              }
                            },
                            "required": [
                              "label",
                              "color"
                            ]
                          }
                        }
                      },
                      "required": [
                        "type"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "type": {
                          "type": "string",
                          "const": "auto"
                        },
                        "color": {
                          "type": "string",
                          "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                        },
                        "legend": {
                          "description": "Vlastní legenda; jinak ji portál odvodí z barev",
                          "maxItems": 20,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "label": {
                                "type": "string",
                                "maxLength": 80
                              },
                              "color": {
                                "type": "string",
                                "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                              }
                            },
                            "required": [
                              "label",
                              "color"
                            ]
                          }
                        }
                      },
                      "required": [
                        "type"
                      ]
                    }
                  ]
                },
                "fields": {
                  "maxItems": 100,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 64
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "type": {
                        "default": "string",
                        "type": "string",
                        "enum": [
                          "string",
                          "number",
                          "integer",
                          "boolean",
                          "date",
                          "datetime",
                          "url",
                          "image",
                          "email",
                          "phone"
                        ]
                      },
                      "unit": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "decimals": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 8
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "primary": {
                        "description": "Hodnota slouží jako nadpis objektu v detailu",
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "key",
                      "label"
                    ]
                  }
                },
                "params": {
                  "maxItems": 20,
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "key": {
                        "type": "string",
                        "pattern": "^[a-zA-Z][a-zA-Z0-9_]{0,31}$"
                      },
                      "label": {
                        "type": "string",
                        "minLength": 1,
                        "maxLength": 80
                      },
                      "type": {
                        "type": "string",
                        "enum": [
                          "enum",
                          "multi-enum",
                          "number",
                          "range",
                          "boolean",
                          "date",
                          "date-range",
                          "text"
                        ]
                      },
                      "description": {
                        "type": "string",
                        "maxLength": 300
                      },
                      "options": {
                        "description": "Pro enum a multi-enum",
                        "maxItems": 200,
                        "type": "array",
                        "items": {
                          "type": "object",
                          "properties": {
                            "value": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            },
                            "label": {
                              "type": "string",
                              "minLength": 1,
                              "maxLength": 100
                            }
                          },
                          "required": [
                            "value",
                            "label"
                          ]
                        }
                      },
                      "min": {
                        "type": "number"
                      },
                      "max": {
                        "type": "number"
                      },
                      "step": {
                        "type": "number",
                        "exclusiveMinimum": 0
                      },
                      "unit": {
                        "type": "string",
                        "maxLength": 20
                      },
                      "default": {
                        "type": [
                          "string",
                          "number",
                          "boolean"
                        ]
                      },
                      "required": {
                        "type": "boolean"
                      }
                    },
                    "required": [
                      "key",
                      "label",
                      "type"
                    ]
                  }
                },
                "cache": {
                  "type": "object",
                  "properties": {
                    "ttl": {
                      "description": "Jak dlouho (s) smí portál odpověď držet v cache",
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 31536000
                    },
                    "store": {
                      "description": "Smí portál data uložit do své cache vrstvy pro analýzy a kombinace (výchozí ano)",
                      "type": "boolean"
                    }
                  }
                }
              },
              "required": [
                "id",
                "title",
                "source",
                "presentation"
              ]
            }
          }
        },
        "required": [
          "protocol",
          "provider",
          "datasets"
        ]
      },
      "DataResponse": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "const": "FeatureCollection"
          },
          "features": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "type": {
                  "type": "string",
                  "const": "Feature"
                },
                "id": {
                  "anyOf": [
                    {
                      "type": "string",
                      "maxLength": 200
                    },
                    {
                      "type": "number"
                    }
                  ]
                },
                "geometry": {
                  "anyOf": [
                    {
                      "oneOf": [
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "Point"
                            },
                            "coordinates": {
                              "minItems": 2,
                              "maxItems": 3,
                              "type": "array",
                              "items": {
                                "type": "number"
                              }
                            }
                          },
                          "required": [
                            "type",
                            "coordinates"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "MultiPoint"
                            },
                            "coordinates": {
                              "type": "array",
                              "items": {
                                "minItems": 2,
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "number"
                                }
                              }
                            }
                          },
                          "required": [
                            "type",
                            "coordinates"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "LineString"
                            },
                            "coordinates": {
                              "minItems": 2,
                              "type": "array",
                              "items": {
                                "minItems": 2,
                                "maxItems": 3,
                                "type": "array",
                                "items": {
                                  "type": "number"
                                }
                              }
                            }
                          },
                          "required": [
                            "type",
                            "coordinates"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "MultiLineString"
                            },
                            "coordinates": {
                              "type": "array",
                              "items": {
                                "minItems": 2,
                                "type": "array",
                                "items": {
                                  "minItems": 2,
                                  "maxItems": 3,
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "type",
                            "coordinates"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "Polygon"
                            },
                            "coordinates": {
                              "type": "array",
                              "items": {
                                "minItems": 4,
                                "type": "array",
                                "items": {
                                  "minItems": 2,
                                  "maxItems": 3,
                                  "type": "array",
                                  "items": {
                                    "type": "number"
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "type",
                            "coordinates"
                          ]
                        },
                        {
                          "type": "object",
                          "properties": {
                            "type": {
                              "type": "string",
                              "const": "MultiPolygon"
                            },
                            "coordinates": {
                              "type": "array",
                              "items": {
                                "type": "array",
                                "items": {
                                  "minItems": 4,
                                  "type": "array",
                                  "items": {
                                    "minItems": 2,
                                    "maxItems": 3,
                                    "type": "array",
                                    "items": {
                                      "type": "number"
                                    }
                                  }
                                }
                              }
                            }
                          },
                          "required": [
                            "type",
                            "coordinates"
                          ]
                        }
                      ]
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "properties": {
                  "default": {},
                  "anyOf": [
                    {
                      "type": "object",
                      "propertyNames": {
                        "type": "string"
                      },
                      "additionalProperties": {}
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "dm": {
                  "type": "object",
                  "properties": {
                    "title": {
                      "description": "Nadpis objektu v detailu",
                      "type": "string",
                      "maxLength": 200
                    },
                    "description": {
                      "type": "string",
                      "maxLength": 2000
                    },
                    "url": {
                      "description": "Odkaz na detail objektu u poskytovatele",
                      "type": "string",
                      "format": "uri"
                    },
                    "color": {
                      "description": "Přepíše barvu z prezentace",
                      "type": "string",
                      "pattern": "^#(?:[0-9a-fA-F]{3}|[0-9a-fA-F]{6}|[0-9a-fA-F]{8})$"
                    },
                    "chart": {
                      "description": "Graf vývoje hodnoty v detailu objektu",
                      "type": "object",
                      "properties": {
                        "label": {
                          "type": "string",
                          "minLength": 1,
                          "maxLength": 80,
                          "description": "Co graf ukazuje, např. Počet obyvatel"
                        },
                        "unit": {
                          "type": "string",
                          "maxLength": 20
                        },
                        "decimals": {
                          "type": "integer",
                          "minimum": 0,
                          "maximum": 6
                        },
                        "note": {
                          "description": "Poznámka pod grafem, např. o změně metodiky",
                          "type": "string",
                          "maxLength": 200
                        },
                        "highlight": {
                          "description": "Zvýrazněné období (např. zvolené v časovém filtru) – portál ho podbarví, ukáže hodnotu na jeho konci a změnu i trend počítá od jeho začátku. Stejné from a to = jedno zvolené období (např. rok).",
                          "type": "object",
                          "properties": {
                            "from": {
                              "type": "string",
                              "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                              "description": "Rok, měsíc nebo den v ISO 8601"
                            },
                            "to": {
                              "type": "string",
                              "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                              "description": "Rok, měsíc nebo den v ISO 8601"
                            }
                          },
                          "required": [
                            "from",
                            "to"
                          ]
                        },
                        "points": {
                          "minItems": 2,
                          "maxItems": 100,
                          "type": "array",
                          "items": {
                            "type": "object",
                            "properties": {
                              "period": {
                                "type": "string",
                                "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                                "description": "Rok, měsíc nebo den v ISO 8601"
                              },
                              "value": {
                                "type": "number"
                              }
                            },
                            "required": [
                              "period",
                              "value"
                            ]
                          },
                          "description": "Hodnoty seřazené od nejstaršího období"
                        }
                      },
                      "required": [
                        "label",
                        "points"
                      ]
                    }
                  }
                }
              },
              "required": [
                "type",
                "geometry"
              ]
            }
          },
          "dm": {
            "type": "object",
            "properties": {
              "protocol": {
                "type": "string"
              },
              "generated": {
                "description": "Kdy byla odpověď vytvořena (ISO 8601)",
                "type": "string",
                "maxLength": 40
              },
              "ttl": {
                "description": "Jak dlouho (s) je odpověď platná",
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "total": {
                "description": "Celkový počet objektů odpovídajících dotazu",
                "type": "integer",
                "minimum": 0,
                "maximum": 9007199254740991
              },
              "truncated": {
                "description": "Odpověď neobsahuje všechny objekty (limit)",
                "type": "boolean"
              },
              "next": {
                "description": "Kurzor pro další stránku",
                "type": "string",
                "maxLength": 500
              },
              "notice": {
                "description": "Krátké sdělení pro uživatele, např. přibližte mapu",
                "type": "string",
                "maxLength": 300
              },
              "timeline": {
                "description": "Počty objektů ve výřezu po obdobích za celou dobu, kterou sada pokrývá – nezávisle na zvoleném období a limitu. Portál z nich kreslí graf u legendy.",
                "maxItems": 400,
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "period": {
                      "type": "string",
                      "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                      "description": "Rok, měsíc nebo den v ISO 8601"
                    },
                    "count": {
                      "type": "integer",
                      "minimum": 0,
                      "maximum": 9007199254740991
                    },
                    "values": {
                      "description": "Rozpad počtu podle hodnot vlastnosti, podle které se objekty barví (color.field) – graf je obarví jako legendu",
                      "type": "object",
                      "propertyNames": {
                        "type": "string",
                        "maxLength": 100
                      },
                      "additionalProperties": {
                        "type": "integer",
                        "minimum": 0,
                        "maximum": 9007199254740991
                      }
                    }
                  },
                  "required": [
                    "period",
                    "count"
                  ]
                }
              },
              "chart": {
                "description": "Souhrnný vývoj hodnoty za celé území sady nebo výřez (např. počet obyvatel Česka) – portál ho ukáže u časového filtru, když odpověď neposílá dm.timeline",
                "type": "object",
                "properties": {
                  "label": {
                    "type": "string",
                    "minLength": 1,
                    "maxLength": 80,
                    "description": "Co graf ukazuje, např. Počet obyvatel"
                  },
                  "unit": {
                    "type": "string",
                    "maxLength": 20
                  },
                  "decimals": {
                    "type": "integer",
                    "minimum": 0,
                    "maximum": 6
                  },
                  "note": {
                    "description": "Poznámka pod grafem, např. o změně metodiky",
                    "type": "string",
                    "maxLength": 200
                  },
                  "highlight": {
                    "description": "Zvýrazněné období (např. zvolené v časovém filtru) – portál ho podbarví, ukáže hodnotu na jeho konci a změnu i trend počítá od jeho začátku. Stejné from a to = jedno zvolené období (např. rok).",
                    "type": "object",
                    "properties": {
                      "from": {
                        "type": "string",
                        "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                        "description": "Rok, měsíc nebo den v ISO 8601"
                      },
                      "to": {
                        "type": "string",
                        "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                        "description": "Rok, měsíc nebo den v ISO 8601"
                      }
                    },
                    "required": [
                      "from",
                      "to"
                    ]
                  },
                  "points": {
                    "minItems": 2,
                    "maxItems": 100,
                    "type": "array",
                    "items": {
                      "type": "object",
                      "properties": {
                        "period": {
                          "type": "string",
                          "pattern": "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$",
                          "description": "Rok, měsíc nebo den v ISO 8601"
                        },
                        "value": {
                          "type": "number"
                        }
                      },
                      "required": [
                        "period",
                        "value"
                      ]
                    },
                    "description": "Hodnoty seřazené od nejstaršího období"
                  }
                },
                "required": [
                  "label",
                  "points"
                ]
              }
            }
          }
        },
        "required": [
          "type",
          "features"
        ]
      },
      "Issue": {
        "type": "object",
        "required": [
          "path",
          "code",
          "message"
        ],
        "properties": {
          "path": {
            "type": "string",
            "description": "Místo v dokumentu, např. datasets[0].keywords"
          },
          "code": {
            "type": "string",
            "description": "Stabilní kód nálezu, viz /dokumentace/api.md#kody-nalezu"
          },
          "message": {
            "type": "string"
          },
          "hint": {
            "type": "string",
            "description": "Rada, jak nález opravit"
          }
        }
      },
      "Report": {
        "type": "object",
        "required": [
          "valid",
          "errors",
          "warnings",
          "summary"
        ],
        "properties": {
          "valid": {
            "type": "boolean"
          },
          "summary": {
            "type": "string"
          },
          "errors": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "warnings": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Issue"
            }
          },
          "kind": {
            "type": "string",
            "enum": [
              "manifest",
              "data"
            ]
          },
          "featureCount": {
            "type": "integer"
          },
          "manifestUrl": {
            "type": "string"
          },
          "provider": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "datasets": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "sourceType": {
                  "type": "string"
                },
                "request": {
                  "type": "string"
                },
                "durationMs": {
                  "type": "integer"
                },
                "featureCount": {
                  "type": "integer"
                },
                "valid": {
                  "type": "boolean"
                },
                "summary": {
                  "type": "string"
                },
                "errors": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Issue"
                  }
                },
                "warnings": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/Issue"
                  }
                }
              }
            }
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error",
          "code"
        ],
        "properties": {
          "error": {
            "type": "string"
          },
          "code": {
            "type": "string"
          }
        }
      },
      "Place": {
        "type": "object",
        "required": [
          "name",
          "type",
          "point"
        ],
        "properties": {
          "name": {
            "type": "string"
          },
          "type": {
            "type": "string",
            "description": "adresa, ulice, obec, část obce…"
          },
          "point": {
            "type": "array",
            "items": {
              "type": "number"
            },
            "minItems": 2,
            "maxItems": 2,
            "description": "[lon, lat]"
          },
          "municipality": {
            "type": "object",
            "properties": {
              "slug": {
                "type": "string"
              },
              "name": {
                "type": "string"
              }
            }
          },
          "near": {
            "type": "object",
            "description": "Nejbližší obec nad 10 000 obyvatel (mimo velké obce)",
            "properties": {
              "name": {
                "type": "string"
              },
              "km": {
                "type": "number"
              }
            }
          }
        }
      },
      "PointAnswer": {
        "type": "object",
        "required": [
          "point",
          "radius",
          "generated",
          "results",
          "map"
        ],
        "properties": {
          "place": {
            "$ref": "#/components/schemas/Place"
          },
          "point": {
            "type": "array",
            "items": {
              "type": "number"
            }
          },
          "radius": {
            "type": "number"
          },
          "generated": {
            "type": "string",
            "format": "date-time"
          },
          "skipped": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Sady nad limit, na které se dotaz neptal"
          },
          "map": {
            "type": "string",
            "format": "uri"
          },
          "results": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "dataset",
                "title",
                "status",
                "hits"
              ],
              "properties": {
                "dataset": {
                  "type": "string"
                },
                "title": {
                  "type": "string"
                },
                "description": {
                  "type": "string"
                },
                "legend": {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                "provider": {
                  "type": "string"
                },
                "attribution": {
                  "type": "string"
                },
                "license": {
                  "type": "string"
                },
                "status": {
                  "type": "string",
                  "enum": [
                    "ok",
                    "nelze",
                    "chyba"
                  ]
                },
                "count": {
                  "type": "integer"
                },
                "radius": {
                  "type": "number"
                },
                "truncated": {
                  "type": "boolean"
                },
                "notice": {
                  "type": "string"
                },
                "error": {
                  "type": "string"
                },
                "code": {
                  "type": "string"
                },
                "hits": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "required": [
                      "title",
                      "distance",
                      "values"
                    ],
                    "properties": {
                      "title": {
                        "type": "string"
                      },
                      "distance": {
                        "type": "number"
                      },
                      "values": {
                        "type": "array",
                        "items": {
                          "type": "object",
                          "required": [
                            "label",
                            "value"
                          ],
                          "properties": {
                            "label": {
                              "type": "string"
                            },
                            "value": {
                              "type": "string"
                            }
                          }
                        }
                      },
                      "description": {
                        "type": "string"
                      },
                      "url": {
                        "type": "string"
                      },
                      "chart": {
                        "type": "object"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}