{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/chartercaptain-com/json-schema/chartercaptain-com-captain-profile-schema.json",
  "title": "CaptainProfile",
  "x-generated": "2026-11-03",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/chartercaptain-com-openapi.json#/components/schemas/CaptainProfile",
  "type": "object",
  "required": [
    "slug",
    "name",
    "defaultHarbor",
    "rating",
    "reviewCount",
    "startingPrice"
  ],
  "properties": {
    "slug": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "bio": {
      "type": [
        "string",
        "null"
      ]
    },
    "profileImageUrl": {
      "type": [
        "string",
        "null"
      ]
    },
    "defaultHarbor": {
      "type": [
        "string",
        "null"
      ],
      "deprecated": true,
      "description": "Deprecated: use harbors[]. This field returns the home harbor name. Removed in a future release."
    },
    "harbors": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "harborId": {
            "type": "string"
          },
          "isHome": {
            "type": "boolean"
          },
          "name": {
            "type": "string"
          }
        },
        "required": [
          "harborId",
          "isHome",
          "name"
        ]
      }
    },
    "rating": {
      "type": "number"
    },
    "reviewCount": {
      "type": "integer"
    },
    "startingPrice": {
      "type": "number"
    },
    "depositType": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "FIXED",
        "PERCENTAGE"
      ]
    },
    "depositValue": {
      "type": [
        "integer",
        "null"
      ]
    },
    "windowDays": {
      "type": [
        "integer",
        "null"
      ]
    },
    "depositRefundable": {
      "type": [
        "boolean",
        "null"
      ]
    },
    "weatherCancellationPolicy": {
      "type": [
        "string",
        "null"
      ]
    },
    "availableDurations": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Duration"
      }
    },
    "pricingTiers": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/PricingTier"
      }
    }
  },
  "$defs": {
    "Duration": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "hours": {
          "type": "integer"
        },
        "label": {
          "type": "string"
        },
        "isActive": {
          "type": "boolean"
        },
        "sortOrder": {
          "type": "integer"
        }
      },
      "required": [
        "id",
        "hours",
        "label"
      ]
    },
    "PricingTier": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string"
        },
        "captainId": {
          "type": "string"
        },
        "name": {
          "type": "string"
        },
        "ratePerHour": {
          "type": [
            "number",
            "null"
          ]
        },
        "isActive": {
          "type": "boolean"
        }
      },
      "required": [
        "id",
        "captainId",
        "name"
      ]
    }
  }
}