{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/parkypass-com/json-schema/parkypass-com-conditions-response-schema.json",
  "title": "ConditionsResponse",
  "x-generated": "2026-11-20",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/parkypass-com-openapi.json#/components/schemas/ConditionsResponse",
  "type": "object",
  "required": [
    "schema_version",
    "park_id",
    "weather",
    "rides",
    "docs_url",
    "attribution",
    "generated_at"
  ],
  "properties": {
    "schema_version": {
      "type": "integer",
      "const": 1,
      "description": "Response format version. Fields are only added within a version."
    },
    "park_id": {
      "type": "string"
    },
    "park_key": {
      "type": "string"
    },
    "park_name": {
      "type": "string"
    },
    "time_zone": {
      "type": "string"
    },
    "weather": {
      "type": [
        "object",
        "null"
      ],
      "description": "Null when no National Weather Service observation from the last 3 hours exists.",
      "properties": {
        "observed_at": {
          "type": "string",
          "format": "date-time"
        },
        "condition": {
          "type": [
            "string",
            "null"
          ]
        },
        "summary": {
          "type": [
            "string",
            "null"
          ]
        },
        "temperature_f": {
          "type": [
            "number",
            "null"
          ]
        },
        "feels_like_f": {
          "type": [
            "number",
            "null"
          ]
        },
        "heat_index_f": {
          "type": [
            "number",
            "null"
          ]
        },
        "precipitation_chance_percent": {
          "type": [
            "number",
            "null"
          ]
        },
        "precipitation_in_per_hour": {
          "type": [
            "number",
            "null"
          ]
        },
        "wind_speed_mph": {
          "type": [
            "number",
            "null"
          ]
        },
        "wind_gust_mph": {
          "type": [
            "number",
            "null"
          ]
        },
        "lightning_risk": {
          "type": [
            "string",
            "null"
          ],
          "description": "Parky's reading of the forecast text and alerts."
        },
        "alerts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "event": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "headline": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "severity": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "onset": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              },
              "expires": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          }
        },
        "thunderstorm_alert": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "severe_alert": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "source": {
          "type": "string",
          "const": "National Weather Service"
        }
      }
    },
    "rides": {
      "type": "object",
      "properties": {
        "data_status": {
          "type": "string",
          "enum": [
            "live",
            "unavailable"
          ]
        },
        "park_open": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "checked_at": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "operating": {
          "type": "integer"
        },
        "down": {
          "type": "integer"
        },
        "closed": {
          "type": "integer"
        },
        "unavailable": {
          "type": "integer"
        },
        "average_wait_minutes": {
          "type": [
            "number",
            "null"
          ]
        },
        "longest_wait_minutes": {
          "type": [
            "number",
            "null"
          ]
        }
      }
    },
    "note": {
      "type": "string"
    },
    "docs_url": {
      "type": "string",
      "format": "uri",
      "description": "Developer documentation."
    },
    "attribution": {
      "$ref": "#/$defs/Attribution"
    },
    "generated_at": {
      "type": "string",
      "format": "date-time",
      "description": "When Parky built this response."
    }
  },
  "$defs": {
    "Attribution": {
      "type": "object",
      "required": [
        "text",
        "url",
        "required"
      ],
      "description": "Required credit. Wherever Parky data is shown, display `text` with a visible link to `url`; the link must stay visible.",
      "properties": {
        "text": {
          "type": "string",
          "const": "Live data from parkypass.com",
          "description": "Text to display."
        },
        "url": {
          "type": "string",
          "format": "uri",
          "description": "The matching parkypass.com page to link."
        },
        "required": {
          "type": "boolean",
          "const": true,
          "description": "Always true: attribution is a condition of use."
        }
      }
    }
  }
}