{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/digitraffic-fi/json-schema/digitraffic-fi-dirways-schema.json",
  "title": "Dirways",
  "description": "GeoJSON FeatureCollection",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/digitraffic-fi-marine-api-openapi.yml#/components/schemas/Dirways",
  "required": [
    "features",
    "type"
  ],
  "type": "object",
  "properties": {
    "features": {
      "type": "array",
      "items": {
        "required": [
          "geometry",
          "properties",
          "type"
        ],
        "type": "object",
        "properties": {
          "geometry": {
            "anyOf": [
              {
                "required": [
                  "coordinates",
                  "type"
                ],
                "type": "object",
                "properties": {
                  "coordinates": {
                    "maxItems": 3,
                    "minItems": 2,
                    "type": "array",
                    "items": {
                      "type": "number"
                    }
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "Point"
                    ]
                  }
                },
                "additionalProperties": false
              },
              {
                "required": [
                  "coordinates",
                  "type"
                ],
                "type": "object",
                "properties": {
                  "coordinates": {
                    "minItems": 2,
                    "type": "array",
                    "items": {
                      "maxItems": 3,
                      "minItems": 2,
                      "type": "array",
                      "items": {
                        "type": "number"
                      }
                    }
                  },
                  "type": {
                    "type": "string",
                    "enum": [
                      "LineString"
                    ]
                  }
                },
                "additionalProperties": false
              }
            ]
          },
          "type": {
            "type": "string",
            "enum": [
              "Feature"
            ]
          },
          "properties": {
            "required": [
              "description",
              "name"
            ],
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "description": {
                "type": "string"
              }
            },
            "additionalProperties": false,
            "description": "Dirways are paths published by icebreakers to help coordinate the movement of vessels through the ice."
          }
        },
        "additionalProperties": false,
        "description": "GeoJSON Feature"
      }
    },
    "type": {
      "type": "string",
      "enum": [
        "FeatureCollection"
      ]
    }
  },
  "additionalProperties": false
}