{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/terminal49/json-schema/terminal49-port-schema.json",
  "title": "Port model",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/terminal49-ports-api-openapi.yml#/components/schemas/port",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "attributes": {
      "type": "object",
      "properties": {
        "name": {
          "type": "string"
        },
        "code": {
          "type": "string",
          "description": "UN/LOCODE"
        },
        "state_abbr": {
          "type": [
            "string",
            "null"
          ],
          "x-stoplight": {
            "id": "jixah1a0q3exs"
          }
        },
        "city": {
          "type": [
            "string",
            "null"
          ],
          "x-stoplight": {
            "id": "657ij4boc7kyv"
          }
        },
        "country_code": {
          "type": "string",
          "description": "2 digit country code"
        },
        "time_zone": {
          "type": "string",
          "description": "IANA tz"
        },
        "latitude": {
          "type": [
            "number",
            "null"
          ],
          "x-stoplight": {
            "id": "480os7a90z6kk"
          }
        },
        "longitude": {
          "type": [
            "number",
            "null"
          ],
          "x-stoplight": {
            "id": "nfdetqgx5p1yv"
          }
        }
      }
    },
    "type": {
      "type": "string",
      "enum": [
        "port"
      ]
    }
  },
  "required": [
    "id",
    "type"
  ]
}