{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/autodesk-construction-cloud/json-schema/autodesk-construction-cloud-weather-schema.json",
  "title": "Weather",
  "description": "Weather data in metric units.",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/autodesk-construction-cloud-forms-openapi.yml#/components/schemas/Weather",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Unique identifier for the weather record."
    },
    "summaryKey": {
      "type": "string",
      "description": "A code describing the weather conditions in SCREAMING_SNAKE_CASE. Common values include: CLEAR, RAIN, SNOW, SLEET, WIND, FOG, CLOUDY, PARTLY_CLOUDY, MOSTLY_CLEAR, MOSTLY_CLOUDY, HEAVY_RAIN, DRIZZLE, HEAVY_SNOW, FLURRIES, FREEZING_RAIN, THUNDERSTORMS, WINDY, BREEZY, FOGGY, HAZE, BLIZZARD, HOT, FRIGID, WINTRY_MIX. Additional values may appear as weather condition codes evolve."
    },
    "precipitationType": {
      "type": [
        "string",
        "null"
      ],
      "description": "Type of precipitation. Possible values: RAIN, SNOW, SLEET, or null if no precipitation."
    },
    "precipitationAccumulation": {
      "type": "number",
      "description": "Amount of precipitation accumulated throughout the day, in millimeters (mm)."
    },
    "hourlyWeather": {
      "type": "array",
      "description": "Weather observations for specific hours of the day (typically 07:00, 12:00, and 16:00 local time).",
      "items": {
        "$ref": "#/$defs/WeatherHourly"
      }
    },
    "provider": {
      "type": "string",
      "description": "Indicates the source of the weather data. Possible values: DARK_SKY, WEATHER_KIT",
      "enum": [
        "DARK_SKY",
        "WEATHER_KIT"
      ]
    },
    "fetchedAt": {
      "type": "string",
      "format": "date-time",
      "description": "The date and time when the weather data was fetched from the weather API."
    }
  },
  "$defs": {
    "WeatherHourly": {
      "type": "object",
      "properties": {
        "id": {
          "type": "integer",
          "description": "Unique identifier for the hourly weather record."
        },
        "summaryKey": {
          "type": "string",
          "description": "A code describing the weather conditions for this hour in SCREAMING_SNAKE_CASE. Common values include: CLEAR, RAIN, SNOW, SLEET, WIND, FOG, CLOUDY, PARTLY_CLOUDY, MOSTLY_CLEAR, MOSTLY_CLOUDY, HEAVY_RAIN, DRIZZLE, HEAVY_SNOW, FLURRIES, FREEZING_RAIN, THUNDERSTORMS, WINDY, BREEZY, FOGGY, HAZE, BLIZZARD, HOT, FRIGID, WINTRY_MIX. Additional values may appear as weather condition codes evolve."
        },
        "hour": {
          "type": "string",
          "description": "The hour of day for this observation, in HH:MM:SS format (24-hour clock)."
        },
        "temp": {
          "type": "number",
          "description": "Temperature during the specified hour, in degrees Celsius (°C)."
        },
        "windSpeed": {
          "type": "number",
          "description": "Average wind speed during the specified hour, in kilometers per hour (km/h)."
        },
        "windBearing": {
          "type": "integer",
          "description": "Direction the wind is coming from, in degrees (0-360). North is 0°, East is 90°, South is 180°, West is 270°."
        },
        "windBearingKey": {
          "type": "string",
          "description": "Cardinal direction the wind is coming from. Possible values: N, NE, E, SE, S, SW, W, NW.",
          "enum": [
            "N",
            "NE",
            "E",
            "SE",
            "S",
            "SW",
            "W",
            "NW"
          ]
        },
        "humidity": {
          "type": "number",
          "description": "Relative humidity as a decimal value between 0 and 1 (e.g., 0.65 represents 65% humidity)."
        }
      }
    }
  }
}