{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/xweather/refs/heads/main/json-schema/xweather-alert-schema.json",
  "title": "Alert",
  "description": "Alert schema from Xweather Weather API",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Unique alert identifier."
    },
    "type": {
      "type": "string",
      "description": "Alert type code."
    },
    "name": {
      "type": "string",
      "description": "Alert name."
    },
    "body": {
      "type": "string",
      "description": "Full text body of the alert."
    },
    "timestamps": {
      "type": "object",
      "properties": {
        "issued": {
          "type": "integer"
        },
        "expires": {
          "type": "integer"
        },
        "updated": {
          "type": "integer"
        }
      }
    },
    "areas": {
      "type": "array",
      "items": {
        "type": "object"
      },
      "description": "Geographic areas affected by the alert."
    }
  }
}