{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/cruise-itinerary-com/json-schema/cruise-itinerary-com-resolve-batch-result-schema.json",
  "title": "ResolveBatchResult",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/cruise-itinerary-com-resolver-api-openapi.yml#/components/schemas/ResolveBatchResult",
  "type": "object",
  "properties": {
    "q": {
      "type": "string"
    },
    "type": {
      "oneOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ]
    },
    "candidates": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ResolveCandidate"
      }
    }
  },
  "required": [
    "q",
    "type",
    "candidates"
  ],
  "additionalProperties": false,
  "$defs": {
    "ResolveCandidate": {
      "type": "object",
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "port",
            "ship",
            "line"
          ]
        },
        "id": {
          "type": "string",
          "description": "Slug."
        },
        "name": {
          "type": "string"
        },
        "confidence": {
          "type": "number",
          "description": "0 to 1. 1.0 is an exact name match; below about 0.6 is a guess.",
          "minimum": 0,
          "maximum": 1
        },
        "match": {
          "type": "string",
          "enum": [
            "exact",
            "alias",
            "normalized",
            "fuzzy"
          ]
        }
      },
      "required": [
        "type",
        "id",
        "name",
        "confidence",
        "match"
      ],
      "additionalProperties": false
    }
  }
}