4 Commits

Author SHA1 Message Date
645faf1003 Add TrainByHeadcode response type
All checks were successful
Generate and Release Protos / release (push) Successful in 38s
2026-04-27 00:12:16 +01:00
a2308198e9 Add nearest stations schema
All checks were successful
Generate and Release Protos / release (push) Successful in 32s
2026-03-30 20:50:03 +01:00
8c2ed1ad8f Ensure TIPLOC is an optional entry. 'stations' will not include a TIPLOC as there is no 1-to-1 mapping.
All checks were successful
Generate and Release Protos / release (push) Successful in 25s
2026-03-25 09:36:47 +00:00
0848fe3b27 Create location filter schema
All checks were successful
Generate and Release Protos / release (push) Successful in 29s
2026-03-24 00:38:08 +00:00
4 changed files with 92 additions and 1 deletions

View File

@@ -11,7 +11,7 @@
"description": "Unix timestamp showing when the data was generated, or the time the error was encountered" "description": "Unix timestamp showing when the data was generated, or the time the error was encountered"
}, },
"d": { "d": {
"description": "Payload data. Type depends on request endpoint" "description": "Payload data. Type depends on request endpoint, typically an array of the response type"
}, },
"e": { "e": {
"type": "object", "type": "object",

View File

@@ -0,0 +1,31 @@
{
"$id": "https://schema.owlboard.info/api/location-filter.schema.json",
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "LocationFilterObject",
"description": "Location filter API Response. Provides a location's data for filtering on the frontend",
"type": "object",
"required": ["n", "s"],
"additionalProperties": false,
"properties": {
"n": {
"type": "string",
"name": "Name",
"description": "Name of the location"
},
"t": {
"type": "string",
"name": "TIPLOC",
"description": "TIPLOC of the location"
},
"c": {
"type": "string",
"name": "CRS",
"description": "CRS of the location"
},
"s": {
"type": "string",
"name": "searchString",
"description": "Generated string for efficient filtering"
}
}
}

View File

@@ -0,0 +1,19 @@
{
"$id": "https://schema.owlboard.info/api/stations/nearestStations.schema.json",
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "StationsNearestStations",
"description": "Nearest Stations API Resonse. Returned as an Array of the object. Response array will be sorted - nearest first",
"type": "object",
"properties": {
"c": {
"type": "string",
"name": "CRS"
},
"n": {
"type": "string",
"name": "Station Name"
}
},
"required": ["c", "n"],
"additionalProperties": false
}

View File

@@ -0,0 +1,41 @@
{
"$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
}
}
}