{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/fiatdock-com/json-schema/fiatdock-com-weather-forecast-schema.json",
  "title": "WeatherForecast",
  "description": "Paid. Weather forecast for any point (MET Norway, 9 days).",
  "x-generated": "2026-11-07",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/fiatdock-com-openapi.json#/components/schemas/WeatherForecast",
  "type": "object",
  "properties": {
    "location": {
      "type": "object",
      "properties": {
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        },
        "elevationM": {
          "type": [
            "number",
            "null"
          ]
        }
      },
      "required": [
        "lat",
        "lon",
        "elevationM"
      ],
      "description": "The point forecast (rounded to 4 decimals) and its elevation above sea level as MET models it"
    },
    "current": {
      "type": "object",
      "properties": {
        "time": {
          "type": "string"
        },
        "airTemperatureC": {
          "type": [
            "number",
            "null"
          ]
        },
        "relativeHumidityPct": {
          "type": [
            "number",
            "null"
          ]
        },
        "windSpeedMs": {
          "type": [
            "number",
            "null"
          ]
        },
        "windFromDeg": {
          "type": [
            "number",
            "null"
          ]
        },
        "cloudCoverPct": {
          "type": [
            "number",
            "null"
          ]
        },
        "precipitationNext1hMm": {
          "type": [
            "number",
            "null"
          ]
        },
        "symbol": {
          "type": [
            "string",
            "null"
          ]
        }
      },
      "required": [
        "time",
        "airTemperatureC",
        "relativeHumidityPct",
        "windSpeedMs",
        "windFromDeg",
        "cloudCoverPct",
        "precipitationNext1hMm",
        "symbol"
      ],
      "description": "The forecast for the hour now falls in (a forecast, not an observation)"
    },
    "hourly": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "time": {
            "type": "string",
            "description": "Start of the period (UTC, ISO 8601)"
          },
          "airTemperatureC": {
            "type": [
              "number",
              "null"
            ]
          },
          "precipitationMm": {
            "type": [
              "number",
              "null"
            ],
            "description": "Precipitation over the next periodHours hours"
          },
          "periodHours": {
            "type": [
              "number",
              "null"
            ],
            "description": "1 or 6: the period precipitationMm and symbol cover; null when MET gives none for this row"
          },
          "windSpeedMs": {
            "type": [
              "number",
              "null"
            ]
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ],
            "description": "MET weather symbol code for the period, e.g. partlycloudy_day"
          }
        },
        "required": [
          "time",
          "airTemperatureC",
          "precipitationMm",
          "periodHours",
          "windSpeedMs",
          "symbol"
        ]
      },
      "description": "Forecast rows from now for `hours` hours: 1-hour steps for about 2.5 days, then 6-hour steps"
    },
    "daily": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "date": {
            "type": "string",
            "description": "UTC calendar date (YYYY-MM-DD)"
          },
          "minTempC": {
            "type": [
              "number",
              "null"
            ]
          },
          "maxTempC": {
            "type": [
              "number",
              "null"
            ]
          },
          "precipitationMm": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total over the covered hours; null if a period had no amount"
          },
          "hoursCovered": {
            "type": "number",
            "description": "Hours of this UTC day the forecast covers (the first day starts now)"
          },
          "symbol": {
            "type": [
              "string",
              "null"
            ],
            "description": "The condition covering the most hours, without its _day/_night variant"
          }
        },
        "required": [
          "date",
          "minTempC",
          "maxTempC",
          "precipitationMm",
          "hoursCovered",
          "symbol"
        ]
      },
      "description": "One row per UTC day, today first: min/max temperature, total precipitation, main condition"
    },
    "units": {
      "type": "object",
      "properties": {
        "airTemperature": {
          "type": "string"
        },
        "precipitation": {
          "type": "string"
        },
        "windSpeed": {
          "type": "string"
        },
        "windFromDirection": {
          "type": "string"
        },
        "relativeHumidity": {
          "type": "string"
        },
        "cloudCover": {
          "type": "string"
        }
      },
      "required": [
        "airTemperature",
        "precipitation",
        "windSpeed",
        "windFromDirection",
        "relativeHumidity",
        "cloudCover"
      ],
      "description": "The unit of every number"
    },
    "modelUpdatedAt": {
      "type": [
        "string",
        "null"
      ],
      "description": "When MET last updated this forecast (meta.updated_at)"
    },
    "forecastEndsAt": {
      "type": "string",
      "description": "The last forecast time MET publishes for this point (about 9-10 days ahead)"
    },
    "attribution": {
      "type": "string",
      "description": "The credit MET Norway's licence (CC BY 4.0 / NLOD 2.0) requires — keep it beside any use of the data"
    },
    "source": {
      "type": "string",
      "description": "Where the data came from"
    },
    "asOf": {
      "type": "string",
      "description": "ISO time the forecast was read from MET (or revalidated as unchanged)"
    },
    "note": {
      "type": "string",
      "description": "How to read the rows (UTC times, step lengths, daily rules) and their limits"
    },
    "defaulted": {
      "type": "object",
      "properties": {
        "field": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "value": {
          "type": "string"
        },
        "note": {
          "type": "string"
        }
      },
      "required": [
        "field",
        "to",
        "value",
        "note"
      ],
      "description": "Present only when the body was empty: which point the answer is for, and why"
    }
  },
  "required": [
    "location",
    "current",
    "hourly",
    "daily",
    "units",
    "modelUpdatedAt",
    "forecastEndsAt",
    "attribution",
    "source",
    "asOf",
    "note"
  ]
}