{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/alert-camp/json-schema/alert-camp-route-catalog-response-schema.json",
  "title": "RouteCatalogResponse",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/alert-camp-itineraries-api-openapi.yml#/components/schemas/RouteCatalogResponse",
  "properties": {
    "park_id": {
      "type": "string",
      "title": "Park Id"
    },
    "trails": {
      "items": {
        "$ref": "#/$defs/TrailSummary"
      },
      "type": "array",
      "title": "Trails",
      "default": []
    },
    "total": {
      "type": "integer",
      "title": "Total"
    }
  },
  "type": "object",
  "required": [
    "park_id",
    "total"
  ],
  "$defs": {
    "RouteNightSummary": {
      "properties": {
        "night_index": {
          "type": "integer",
          "title": "Night Index"
        },
        "campground_id": {
          "type": "string",
          "title": "Campground Id"
        },
        "site_ids": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Site Ids"
        },
        "site_names": {
          "items": {
            "type": "string"
          },
          "type": "array",
          "title": "Site Names",
          "default": []
        },
        "map_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Map Id"
        },
        "site_map_x": {
          "items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "array",
          "title": "Site Map X",
          "default": []
        },
        "site_map_y": {
          "items": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "array",
          "title": "Site Map Y",
          "default": []
        },
        "site_lat": {
          "items": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "array",
          "title": "Site Lat",
          "default": []
        },
        "site_lng": {
          "items": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ]
          },
          "type": "array",
          "title": "Site Lng",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "night_index",
        "campground_id",
        "site_ids"
      ],
      "title": "RouteNightSummary"
    },
    "RouteSummary": {
      "properties": {
        "id": {
          "type": "string",
          "title": "Id"
        },
        "park_id": {
          "type": "string",
          "title": "Park Id"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "nights": {
          "type": "integer",
          "title": "Nights"
        },
        "trail_key": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Trail Key"
        },
        "variant_label": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Variant Label"
        },
        "distance_km": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Distance Km"
        },
        "trip_type": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Trip Type"
        },
        "map_id": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "title": "Map Id"
        },
        "night_rows": {
          "items": {
            "$ref": "#/$defs/RouteNightSummary"
          },
          "type": "array",
          "title": "Night Rows",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "id",
        "park_id",
        "name",
        "nights"
      ],
      "title": "RouteSummary",
      "description": "One pace of a trail — 'Rockwall, 4 nights'."
    },
    "TrailSummary": {
      "properties": {
        "trail_key": {
          "type": "string",
          "title": "Trail Key"
        },
        "name": {
          "type": "string",
          "title": "Name"
        },
        "distance_km": {
          "anyOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ],
          "title": "Distance Km"
        },
        "variants": {
          "items": {
            "$ref": "#/$defs/RouteSummary"
          },
          "type": "array",
          "title": "Variants",
          "default": []
        }
      },
      "type": "object",
      "required": [
        "trail_key",
        "name"
      ],
      "title": "TrailSummary",
      "description": "A trail plus the paces it can be walked at.\n\nHikers pick the trail first and the pace second (\"I want the Rockwall, and\nI have four days\"), and the parks themselves publish trails with a duration\nRANGE rather than one fixed itinerary. Grouping here keeps the picker one\ndecision the user already has an opinion about, instead of a list of\nnear-duplicate rows."
    }
  }
}