{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/weatherai-io/json-schema/weatherai-io-best-day-schema.json",
  "title": "BestDay",
  "x-generated": "2026-10-31",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/weatherai-io-api-openapi.json#/components/schemas/BestDay",
  "type": "object",
  "properties": {
    "location": {
      "type": "object"
    },
    "activity": {
      "type": "string"
    },
    "days_checked": {
      "type": "integer"
    },
    "summary": {
      "type": "string"
    },
    "best": {
      "$ref": "#/$defs/DayRanking"
    },
    "days": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/DayRanking"
      }
    },
    "billing": {
      "type": "object"
    }
  },
  "$defs": {
    "DayRanking": {
      "type": "object",
      "properties": {
        "date": {
          "type": "string",
          "format": "date"
        },
        "weekday": {
          "type": "string"
        },
        "verdict": {
          "type": "string",
          "enum": [
            "great",
            "good",
            "fair",
            "poor",
            "avoid"
          ]
        },
        "score": {
          "type": "integer"
        },
        "best_window": {
          "$ref": "#/$defs/Window"
        },
        "top_risks": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/Risk"
          }
        },
        "summary": {
          "type": "string"
        }
      }
    },
    "Risk": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string"
        },
        "severity": {
          "type": "string",
          "enum": [
            "low",
            "moderate",
            "high",
            "severe",
            "extreme"
          ]
        },
        "from": {
          "type": "string"
        },
        "to": {
          "type": "string"
        },
        "detail": {
          "type": "string"
        }
      }
    },
    "Window": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string"
        },
        "end": {
          "type": "string"
        },
        "score": {
          "type": "integer"
        }
      }
    }
  }
}