{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://ta-petro.com/schemas/location",
  "title": "Travel Center Location",
  "description": "A TA, Petro, or TA Express travel center location with amenities",
  "type": "object",
  "required": ["id", "name", "brand", "address", "city", "state", "lat", "lon"],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique location identifier"
    },
    "name": {
      "type": "string",
      "description": "Location name"
    },
    "brand": {
      "type": "string",
      "enum": ["TA", "Petro", "TA Express"],
      "description": "Travel center brand"
    },
    "address": {
      "type": "string",
      "description": "Street address"
    },
    "city": {
      "type": "string",
      "description": "City"
    },
    "state": {
      "type": "string",
      "pattern": "^[A-Z]{2}$",
      "description": "US state code"
    },
    "zip": {
      "type": "string",
      "pattern": "^\\d{5}(-\\d{4})?$",
      "description": "ZIP code"
    },
    "lat": {
      "type": "number",
      "minimum": 24,
      "maximum": 50,
      "description": "Latitude (US continental range)"
    },
    "lon": {
      "type": "number",
      "minimum": -125,
      "maximum": -66,
      "description": "Longitude (US continental range)"
    },
    "phone": {
      "type": "string",
      "description": "Location phone number"
    },
    "hours": {
      "type": "string",
      "description": "Operating hours description"
    },
    "truck_lanes": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of diesel truck fuel lanes"
    },
    "truck_parking_spaces": {
      "type": "integer",
      "minimum": 0,
      "description": "Number of truck parking spaces"
    },
    "amenities": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of available amenities"
    }
  }
}
