{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/vedarai-ru/json-schema/vedarai-ru-weather-response-schema.json",
  "title": "WeatherResponse",
  "x-generated": "2026-11-27",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/vedarai-ru-openapi.yml#/components/schemas/WeatherResponse",
  "type": "object",
  "required": [
    "success",
    "data"
  ],
  "properties": {
    "success": {
      "const": true
    },
    "data": {
      "type": "object",
      "description": "Сводка по провайдеру. Ветер — км/ч; давление зависит от провайдера: Open-Meteo даёт гПа, остальные — мм рт. ст. Поля windGust, dewPoint, sunrise, sunset, moonPhase, hourlyForecast, alerts есть не у всех провайдеров.",
      "additionalProperties": true,
      "required": [
        "location",
        "temperature",
        "condition",
        "forecast",
        "safetyLevel",
        "lastUpdated"
      ],
      "properties": {
        "location": {
          "type": "string"
        },
        "temperature": {
          "type": "number"
        },
        "feelsLike": {
          "type": "number"
        },
        "condition": {
          "type": "string"
        },
        "conditionText": {
          "type": "string"
        },
        "humidity": {
          "type": [
            "number",
            "null"
          ]
        },
        "windSpeed": {
          "type": "number",
          "description": "км/ч"
        },
        "windDirection": {
          "type": "number"
        },
        "pressure": {
          "type": "number"
        },
        "visibility": {
          "type": [
            "number",
            "null"
          ]
        },
        "uvIndex": {
          "type": "number"
        },
        "cloudCover": {
          "type": "number"
        },
        "forecast": {
          "type": "array",
          "items": {
            "type": "object",
            "additionalProperties": true,
            "properties": {
              "date": {
                "type": "string"
              },
              "temperature": {
                "type": "object",
                "properties": {
                  "min": {
                    "type": "number"
                  },
                  "max": {
                    "type": "number"
                  }
                }
              },
              "condition": {
                "type": "string"
              },
              "conditionText": {
                "type": "string"
              },
              "precipitation": {
                "type": "number"
              },
              "precipitationProbability": {
                "type": "number"
              },
              "windSpeed": {
                "type": "number"
              },
              "humidity": {
                "type": [
                  "number",
                  "null"
                ]
              }
            }
          }
        },
        "lastUpdated": {
          "type": "string"
        },
        "safetyLevel": {
          "type": "string",
          "enum": [
            "excellent",
            "good",
            "moderate",
            "difficult",
            "dangerous"
          ]
        },
        "recommendations": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "clothingAdvice": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "tourAdvice": {
          "type": "string"
        },
        "comfortIndex": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        }
      }
    }
  }
}