{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/FlightLegDelayContract",
  "title": "FlightLegDelayContract",
  "required": [
    "number"
  ],
  "type": "object",
  "properties": {
    "number": {
      "minLength": 1,
      "type": "string",
      "description": "Flight number"
    },
    "origins": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlightDelayContract"
      },
      "description": "Delay statistics of flight on departure at origins",
      "nullable": true
    },
    "destinations": {
      "type": "array",
      "items": {
        "$ref": "#/components/schemas/FlightDelayContract"
      },
      "description": "Delay statistics of flight on arrival at destinations",
      "nullable": true
    }
  },
  "additionalProperties": false,
  "description": "Delay statistics of a flight leg"
}