{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/api-ninjas-com/json-schema/api-ninjas-com-airport-distance-schema.json",
  "title": "AirportDistance",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/api-ninjas-com-airports-api-openapi.yml#/components/schemas/AirportDistance",
  "type": "object",
  "properties": {
    "from": {
      "type": "string",
      "description": "Origin airport code as provided in the request (uppercased)."
    },
    "to": {
      "type": "string",
      "description": "Destination airport code as provided in the request (uppercased)."
    },
    "distance": {
      "type": "number",
      "format": "double",
      "description": "Great-circle distance in the requested units."
    },
    "bearing_initial": {
      "type": "number",
      "format": "double",
      "description": "Initial bearing from origin to destination, in degrees true (0-360)."
    },
    "unit": {
      "type": "string",
      "description": "Units used for the distance field.",
      "enum": [
        "km",
        "mi",
        "nm"
      ]
    },
    "estimated_flight_time_minutes": {
      "type": "integer",
      "description": "Approximate total flight time in minutes, assuming an 800 km/h cruise plus 30 minutes of ground/climb/descent overhead."
    }
  }
}