{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/digitraffic-fi/json-schema/digitraffic-fi-routeset-schema.json",
  "title": "Routeset",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/digitraffic-fi-routesets-api-openapi.yml#/components/schemas/Routeset",
  "required": [
    "departureDate",
    "trainNumber"
  ],
  "type": "object",
  "properties": {
    "version": {
      "type": "integer",
      "format": "int64"
    },
    "messageTime": {
      "type": "string",
      "format": "date-time"
    },
    "trainNumber": {
      "type": "string",
      "description": "Identifies the train inside a single departure date"
    },
    "departureDate": {
      "type": "string",
      "description": "Date of the train's first departure",
      "format": "date"
    },
    "routeType": {
      "type": "string"
    },
    "clientSystem": {
      "type": "string"
    },
    "messageId": {
      "type": "string"
    },
    "routesections": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/Routesection"
      }
    }
  },
  "$defs": {
    "Routesection": {
      "title": "Routesection",
      "type": "object",
      "properties": {
        "sectionId": {
          "type": "string"
        },
        "stationCode": {
          "type": "string"
        },
        "commercialTrackId": {
          "type": "string"
        }
      }
    }
  }
}