{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/digitraffic-fi/json-schema/digitraffic-fi-third-category-code-schema.json",
  "title": "ThirdCategoryCode",
  "description": "Most detailed category code for a Cause",
  "x-generated": "2026-11-11",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/digitraffic-fi-rail-api-openapi.yml#/components/schemas/ThirdCategoryCode",
  "required": [
    "validFrom"
  ],
  "type": "object",
  "properties": {
    "passengerTerm": {
      "$ref": "#/$defs/PassengerTerm"
    },
    "thirdCategoryCode": {
      "type": "string"
    },
    "thirdCategoryName": {
      "type": "string"
    },
    "description": {
      "type": "string",
      "description": "Detailed description"
    },
    "validFrom": {
      "type": "string",
      "description": "Start date when this category code is used",
      "format": "date"
    },
    "validTo": {
      "type": "string",
      "description": "End date when this code is used. Empty means category is used until further notice",
      "format": "date"
    },
    "id": {
      "type": "integer",
      "format": "int32"
    }
  },
  "$defs": {
    "PassengerTerm": {
      "title": "PassengerTerm",
      "type": "object",
      "properties": {
        "fi": {
          "type": "string",
          "description": "Finnish passenger friendly term for the code"
        },
        "en": {
          "type": "string",
          "description": "English passenger friendly term for the code"
        },
        "sv": {
          "type": "string",
          "description": "Swedish passenger friendly term for the code"
        }
      }
    }
  }
}