{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flyitalyadsb/json-schema/flyitalyadsb-event-list-schema.json",
  "title": "EventList",
  "x-generated": "2026-12-02",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/flyitalyadsb-events-api-openapi.yml#/components/schemas/EventList",
  "type": "object",
  "required": [
    "now",
    "since",
    "until",
    "count",
    "truncated",
    "events"
  ],
  "properties": {
    "now": {
      "type": "number"
    },
    "since": {
      "type": "string",
      "format": "date-time"
    },
    "until": {
      "type": "string",
      "format": "date-time"
    },
    "center": {
      "type": "object",
      "properties": {
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        }
      }
    },
    "dist": {
      "type": "number"
    },
    "kinds": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "count": {
      "type": "integer"
    },
    "truncated": {
      "type": "boolean",
      "description": "More events matched than limit."
    },
    "events": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/TrafficEvent"
      }
    }
  },
  "$defs": {
    "TrafficEvent": {
      "type": "object",
      "description": "An event, plus the aircraft fields known at that moment with readsb's names (flight, r, t, desc, year, alt_baro, gs, track, squawk, emergency, category, dbFlags); `source` is readsb's position type. Never the owner or operator.",
      "required": [
        "id",
        "kind",
        "hex",
        "time",
        "lat",
        "lon"
      ],
      "properties": {
        "id": {
          "type": "integer"
        },
        "kind": {
          "enum": [
            "emergency",
            "military",
            "interesting"
          ]
        },
        "reason": {
          "enum": [
            "general",
            "hijack",
            "radio_failure",
            "minimum_fuel",
            "downed"
          ],
          "description": "Emergencies only."
        },
        "hex": {
          "type": "string"
        },
        "time": {
          "type": "string",
          "format": "date-time",
          "description": "When the aircraft was seen entering the cell."
        },
        "lat": {
          "type": "number"
        },
        "lon": {
          "type": "number"
        },
        "distance_km": {
          "type": "number",
          "description": "From the query point (or the webhook centre)."
        },
        "source": {
          "type": "string",
          "description": "adsb_icao, mlat, …"
        },
        "map": {
          "type": "string",
          "format": "uri",
          "description": "The aircraft on the live map."
        }
      },
      "additionalProperties": true
    }
  }
}