{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ultimaps-com/json-schema/ultimaps-com-map-detail-schema.json",
  "title": "MapDetail",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ultimaps-com-openapi.json#/components/schemas/MapDetail",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "The map's slug. The same id `GET /v1/maps` prints, even when the request used an alias."
    },
    "title": {
      "type": "string"
    },
    "regionType": {
      "type": [
        "string",
        "null"
      ]
    },
    "regionTypePlural": {
      "type": [
        "string",
        "null"
      ]
    },
    "layers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/LayerId"
      },
      "description": "Extra layers this map ships, renderable via the `layers` request field."
    },
    "regionCount": {
      "type": "integer",
      "description": "Regions in the whole map, regardless of `q`/`offset`/`limit`."
    },
    "labels": {
      "type": "boolean",
      "description": "Whether this map ships curated region labels, which is what `style.labels` draws. Coverage varies by map, and the flag only says whether any exist."
    },
    "regions": {
      "type": "array",
      "description": "The requested page of regions. Aliases are accepted as render input but never emitted here. `key` is the one identifier the API documents and prints.\n",
      "items": {
        "type": "object",
        "required": [
          "key",
          "title"
        ],
        "properties": {
          "key": {
            "type": "string",
            "description": "The region's code in the map's primary scheme (ISO 3166-2, FIPS, ZCTA, GSS, …), or its title where the scheme publishes no code. Unique within the map. The recommended render key. Never empty.\n"
          },
          "title": {
            "type": "string"
          }
        }
      }
    },
    "page": {
      "type": "object",
      "required": [
        "offset",
        "limit",
        "matched"
      ],
      "properties": {
        "offset": {
          "type": "integer"
        },
        "limit": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The effective `limit`, or `null` when every matching region was returned."
        },
        "matched": {
          "type": "integer",
          "description": "Regions matching `q` (all of them when `q` is absent) before paging."
        }
      }
    }
  },
  "$defs": {
    "LayerId": {
      "type": "string",
      "description": "The extra-layer vocabulary, shared by every map. Each map ships a subset, listed by `GET /v1/maps` and `GET /v1/maps/{mapId}`. The enum is additive-only: ids are appended, never renamed or removed.",
      "enum": [
        "admin0",
        "admin0-mesh",
        "admin1-mesh",
        "admin1-mesh-inner",
        "admin2-mesh",
        "lakes",
        "rivers",
        "roads",
        "cities",
        "admin1"
      ]
    }
  }
}