{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/united-technologies/json-schema/united-technologies-weather-data-schema.json",
  "title": "WeatherData",
  "description": "Aviation weather observation or forecast.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/united-technologies-weather-api-openapi.yml#/components/schemas/WeatherData",
  "type": "object",
  "properties": {
    "station": {
      "type": "string",
      "description": "ICAO weather station identifier."
    },
    "type": {
      "type": "string",
      "description": "Type of weather report.",
      "enum": [
        "METAR",
        "TAF",
        "SIGMET",
        "PIREP",
        "WINDS_ALOFT"
      ]
    },
    "observationTime": {
      "type": "string",
      "format": "date-time",
      "description": "Time of the weather observation (UTC)."
    },
    "rawText": {
      "type": "string",
      "description": "Raw weather report text."
    },
    "windDirection": {
      "type": "integer",
      "description": "Wind direction in degrees magnetic."
    },
    "windSpeed": {
      "type": "integer",
      "description": "Wind speed in knots."
    },
    "visibility": {
      "type": "number",
      "description": "Visibility in statute miles."
    },
    "clouds": {
      "type": "array",
      "description": "Cloud layers.",
      "items": {
        "$ref": "#/$defs/CloudLayer"
      }
    }
  },
  "$defs": {
    "CloudLayer": {
      "type": "object",
      "description": "A cloud layer in a weather observation.",
      "properties": {
        "coverage": {
          "type": "string",
          "description": "Cloud coverage code.",
          "enum": [
            "FEW",
            "SCT",
            "BKN",
            "OVC"
          ]
        },
        "altitude": {
          "type": "integer",
          "description": "Cloud base altitude in feet MSL."
        }
      }
    }
  }
}