{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/entur/json-schema/entur-fare-section-schema.json",
  "title": "FareSection",
  "description": "A Fare section.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/entur-fare-sections-api-openapi.yml#/components/schemas/FareSection",
  "required": [
    "changed",
    "created",
    "id",
    "modification",
    "nameOfClass",
    "status",
    "version"
  ],
  "type": "object",
  "properties": {
    "changed": {
      "type": "string",
      "description": "Changed datetime",
      "readOnly": true
    },
    "created": {
      "type": "string",
      "description": "Created datetime",
      "readOnly": true
    },
    "description": {
      "type": "array",
      "description": "Description",
      "items": {
        "$ref": "#/$defs/TextInLanguage"
      }
    },
    "fromFarePointRef": {
      "$ref": "#/$defs/VersionOfObjectRef"
    },
    "id": {
      "minLength": 1,
      "pattern": "^([A-Z]{3}):([A-Za-z]*):([0-9A-Za-z_\\-]*)$",
      "type": "string",
      "description": "Id"
    },
    "journeyPatternRef": {
      "$ref": "#/$defs/VersionOfObjectRef"
    },
    "modification": {
      "type": "string",
      "description": "Modification status",
      "readOnly": true,
      "enum": [
        "NEW",
        "REVISE",
        "DELETE"
      ]
    },
    "name": {
      "type": "array",
      "description": "Name",
      "items": {
        "$ref": "#/$defs/TextInLanguage"
      }
    },
    "nameOfClass": {
      "type": "string",
      "description": "Name of class",
      "readOnly": true
    },
    "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true,
      "enum": [
        "DRAFT",
        "PROPOSED",
        "VERSIONED",
        "DEPRECATED"
      ]
    },
    "toFarePointRef": {
      "$ref": "#/$defs/VersionOfObjectRef"
    },
    "version": {
      "minLength": 1,
      "pattern": "^([A-Z]{3}):([A-Za-z]*):([0-9A-Za-z_\\-]*)$",
      "type": "string",
      "description": "Version"
    }
  },
  "$defs": {
    "TextInLanguage": {
      "required": [
        "lang",
        "value"
      ],
      "type": "object",
      "properties": {
        "lang": {
          "minLength": 1,
          "type": "string",
          "description": "Language code."
        },
        "value": {
          "minLength": 1,
          "type": "string",
          "description": "The text."
        }
      },
      "description": "Text in a specific language."
    },
    "VersionOfObjectRef": {
      "required": [
        "nameOfClass",
        "ref",
        "version"
      ],
      "type": "object",
      "properties": {
        "nameOfClass": {
          "minLength": 1,
          "type": "string",
          "description": "Name of class."
        },
        "ref": {
          "minLength": 1,
          "pattern": "^([A-Z]{3}):([A-Za-z]*):([0-9A-Za-z_\\-]*)$",
          "type": "string",
          "description": "The netex id reference to the object."
        },
        "version": {
          "type": "string",
          "description": "Version."
        }
      },
      "description": "Fare frame ref."
    }
  }
}