{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cruise-itinerary-com/json-schema/cruise-itinerary-com-sailing-schema.json",
  "title": "Sailing",
  "x-generated": "2026-10-30",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cruise-itinerary-com-openapi.json#/components/schemas/Sailing",
  "type": "object",
  "properties": {
    "id": {
      "type": "integer",
      "description": "Sailing id (the feed id). Sailings are the only entities with integer ids."
    },
    "cruise": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Cruise slug."
        },
        "title": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "title"
      ],
      "additionalProperties": false
    },
    "ship": {
      "oneOf": [
        {
          "$ref": "#/$defs/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "line": {
      "oneOf": [
        {
          "$ref": "#/$defs/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "departure_date": {
      "type": "string",
      "format": "date"
    },
    "return_date": {
      "oneOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "nights": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "embark_port": {
      "oneOf": [
        {
          "$ref": "#/$defs/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "disembark_port": {
      "oneOf": [
        {
          "$ref": "#/$defs/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "fares": {
      "$ref": "#/$defs/Fares"
    },
    "currency": {
      "type": "string",
      "enum": [
        "USD"
      ]
    },
    "fares_changed_on": {
      "oneOf": [
        {
          "type": "string",
          "description": "Last load on which any fare moved.",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "observed_on": {
      "oneOf": [
        {
          "type": "string",
          "description": "Load that produced these fares.",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "estimated_days": {
      "type": "integer",
      "description": "Itinerary days whose date is estimated (`day_confidence` `estimated`). 0 means every day is exact."
    },
    "page_url": {
      "type": "string",
      "description": "Public page for this sailing on Cruiseable, the free consumer site on the same data.",
      "format": "uri"
    }
  },
  "required": [
    "id",
    "cruise",
    "ship",
    "line",
    "departure_date",
    "return_date",
    "nights",
    "embark_port",
    "disembark_port",
    "fares",
    "currency",
    "fares_changed_on",
    "observed_on",
    "estimated_days",
    "page_url"
  ],
  "additionalProperties": false,
  "$defs": {
    "Fares": {
      "type": "object",
      "properties": {
        "inside": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "outside": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "balcony": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        },
        "suite": {
          "oneOf": [
            {
              "type": "integer"
            },
            {
              "type": "null"
            }
          ]
        }
      },
      "required": [
        "inside",
        "outside",
        "balcony",
        "suite"
      ],
      "additionalProperties": false,
      "description": "Lowest fare in whole US dollars per cabin class. null means the cabin is not offered or is sold out; the feed does not say which."
    },
    "Ref": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Slug."
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "additionalProperties": false
    }
  }
}