Files
api-schemas/schemas/api/trains/TrainByHeadcode.json
Fred Boniface 25c1793df3
All checks were successful
Generate and Release Protos / release (push) Successful in 38s
Add 'cancelled throughout' field, to highlight in the search results whether a service is completely cancelled
2026-05-03 09:34:31 +01:00

47 lines
1.4 KiB
JSON

{
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "TrainByHeadcodeResponse",
"type": "object",
"required": ["r", "ot", "od", "dt", "o"],
"additionalProperties": false,
"properties": {
"r": {
"type": "string",
"name": "rid",
"description": "The RID of the service described"
},
"ot": {
"type": "string",
"name": "Origin TIPLOC",
"description": "The TIPLOC at which the service originates",
"minLength": 4,
"maxLength": 7
},
"od": {
"type": "string",
"name": "Origin Departure",
"format": "date-time",
"description": "The time that the service departs the originating location"
},
"dt": {
"type": "string",
"name": "Destination TIPLOC",
"description": "The TIPLOC at which the service terminates",
"minimum": 4,
"maximum": 7
},
"o": {
"type": "string",
"name": "Operator (TOC)",
"description": "The TOC operating the service",
"minLength": 2,
"maxLength": 2
},
"ct": {
"type": "boolean",
"title": "Cancelled Throughout",
"name": "Cancelled Throughout",
"description": "Whether the train is cancelled throughout"
}
}
}