{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cruise-itinerary-com/json-schema/cruise-itinerary-com-ship-schema.json",
  "title": "Ship",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cruise-itinerary-com-reference-data-api-openapi.yml#/components/schemas/Ship",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Slug."
    },
    "name": {
      "type": "string"
    },
    "line": {
      "oneOf": [
        {
          "$ref": "#/$defs/Ref"
        },
        {
          "type": "null"
        }
      ]
    },
    "imo": {
      "oneOf": [
        {
          "type": "string",
          "description": "IMO number, 7 digits."
        },
        {
          "type": "null"
        }
      ]
    },
    "mmsi": {
      "oneOf": [
        {
          "type": "string",
          "description": "MMSI, 9 digits."
        },
        {
          "type": "null"
        }
      ]
    },
    "passengers": {
      "oneOf": [
        {
          "type": "integer",
          "description": "Lower-berth capacity. Real headcount runs 10 to 20 percent higher."
        },
        {
          "type": "null"
        }
      ]
    },
    "crew": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "gross_tonnage": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "decks": {
      "oneOf": [
        {
          "type": "integer"
        },
        {
          "type": "null"
        }
      ]
    },
    "length_ft": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "width_ft": {
      "oneOf": [
        {
          "type": "number"
        },
        {
          "type": "null"
        }
      ]
    },
    "maiden_voyage": {
      "oneOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "launched": {
      "oneOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "refurbished": {
      "oneOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "adults_only": {
      "oneOf": [
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    }
  },
  "required": [
    "id",
    "name",
    "line",
    "imo",
    "mmsi",
    "passengers",
    "crew",
    "gross_tonnage",
    "decks",
    "length_ft",
    "width_ft",
    "maiden_voyage",
    "launched",
    "refurbished",
    "adults_only"
  ],
  "additionalProperties": false,
  "$defs": {
    "Ref": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "Slug."
        },
        "name": {
          "type": "string"
        }
      },
      "required": [
        "id",
        "name"
      ],
      "additionalProperties": false
    }
  }
}