{
  "$schema": "https://json-schema.org/draft/2020-12",
  "$id": "https://api.starbucks.com/schemas/store",
  "title": "Starbucks Store",
  "description": "A Starbucks retail store location with address, hours, amenities, and service availability.",
  "type": "object",
  "required": ["id", "name", "address", "coordinates"],
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique identifier for the store"
    },
    "name": {
      "type": "string",
      "description": "Store display name"
    },
    "address": {
      "type": "object",
      "required": ["street", "city", "state", "postalCode", "country"],
      "properties": {
        "street": {"type": "string"},
        "city": {"type": "string"},
        "state": {"type": "string"},
        "postalCode": {"type": "string"},
        "country": {"type": "string", "default": "US"}
      }
    },
    "coordinates": {
      "type": "object",
      "required": ["latitude", "longitude"],
      "properties": {
        "latitude": {
          "type": "number",
          "format": "float",
          "minimum": -90,
          "maximum": 90
        },
        "longitude": {
          "type": "number",
          "format": "float",
          "minimum": -180,
          "maximum": 180
        }
      }
    },
    "phone": {
      "type": "string",
      "description": "Store phone number"
    },
    "timezone": {
      "type": "string",
      "description": "Store timezone (IANA format)",
      "example": "America/New_York"
    },
    "hours": {
      "type": "array",
      "description": "Weekly operating hours",
      "items": {
        "type": "object",
        "properties": {
          "day": {
            "type": "string",
            "enum": ["monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"]
          },
          "open": {
            "type": "string",
            "pattern": "^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$",
            "description": "Opening time (HH:MM)"
          },
          "close": {
            "type": "string",
            "pattern": "^([0-1]?[0-9]|2[0-3]):[0-5][0-9]$",
            "description": "Closing time (HH:MM)"
          }
        }
      }
    },
    "amenities": {
      "type": "array",
      "description": "Available store amenities",
      "items": {
        "type": "string",
        "enum": ["wifi", "outdoor_seating", "indoor_seating", "parking", "accessible"]
      }
    },
    "services": {
      "type": "array",
      "description": "Available services at this store",
      "items": {
        "type": "string",
        "enum": ["mobile_order", "drive_thru", "curbside", "delivery", "reserve"]
      }
    },
    "mobileOrderingEnabled": {
      "type": "boolean",
      "description": "Whether mobile ordering is available at this store"
    },
    "driveThru": {
      "type": "boolean",
      "description": "Whether the store has a drive-through lane"
    }
  }
}
