Compare commits

..

4 Commits

Author SHA1 Message Date
311ff3798f Fix knowledgebase stations schema
All checks were successful
Generate and Release Protos / release (push) Successful in 39s
2026-03-28 22:29:46 +00:00
a869935241 Add Knowledgebase Stations schema
All checks were successful
Generate and Release Protos / release (push) Successful in 43s
2026-03-28 22:20:53 +00:00
6cf6ea8aef Update schedule object to handle canellation location 2026-03-27 22:44:03 +00:00
50824255f8 Extend TOC info type to handle URL
All checks were successful
Generate and Release Protos / release (push) Successful in 32s
2026-03-25 13:24:20 +00:00
3 changed files with 144 additions and 0 deletions

View File

@@ -34,12 +34,19 @@
"required": ["c", "n"],
"properties": {
"c": {
"name": "ATOC Code",
"type": "string",
"description": "The ATOC 'code' for the TOC"
},
"n": {
"name": "TOC Name",
"type": "string",
"description": "The name of the TOC"
},
"u": {
"name": "URL",
"type": "string",
"description": "URL for TOC Information"
}
}
}

View File

@@ -0,0 +1,133 @@
{
"$id": "https://schema.owlboard.info/data-ingress/knowledgebase/stations.schema.json",
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "KnowledgebaseStations",
"type": "object",
"properties": {
"service_name": {
"type": "string",
"description": "Name of the service submitting the update"
},
"service_id": {
"type": "string",
"description": "ID of the service sending the message - usually a hostname"
},
"data_type": {
"type": "string",
"const": "raw",
"description": "The type of data contained in this message object"
},
"sent_timestamp": {
"type": "integer",
"description": "Unix timestamp representing the time the message was sent"
},
"data_kind": {
"type": "string",
"const": "kb-stations"
},
"payload": {
"type": "array",
"additionalItems": false,
"items": {
"type": "object",
"required": [
"c",
"l",
"o"
],
"properties": {
"c": {
"type": "string",
"name": "CRS Code",
"description": "Station CRS (Primary Key)"
},
"n": {
"type": "string",
"name": "NLC Code",
"description": "Station NLC Code"
},
"mc": {
"type": "number",
"name": "Minimum Connection Time",
"description": "The minimum connection time at this station"
},
"a": {
"type": "object",
"name": "Address",
"description": "The address of the station",
"properties": {
"l1": {
"type": "string",
"name": "Line 1"
},
"l2": {
"type": "string",
"name": "Line 2"
},
"l3": {
"type": "string",
"name": "Line 3"
},
"l4": {
"type": "string",
"name": "Line 4"
},
"l5": {
"type": "string",
"name": "Line 5"
},
"pc": {
"type": "string",
"name": "Postcode"
}
}
},
"l": {
"type": "object",
"name": "Location",
"description": "LatLon of the station",
"properties": {
"lt": {
"type": "number",
"name": "Latitude",
"description": "Stations Latitude"
},
"ln": {
"type": "number",
"name": "Longitude",
"description": "Stations Longitude"
}
}
},
"o": {
"type": "string",
"name": "Operator",
"description": "The two character code denoting the stations operator"
},
"m": {
"type": "string",
"name": "Map URL"
},
"r": {
"name": "Request",
"type": "boolean",
"description": "Denotes whether station is Request Stop"
},
"d": {
"name": "Defibrillator",
"type": "boolean",
"description": "Denotes whether defibrillator is available"
}
}
}
}
},
"required": [
"service_name",
"service_id",
"data_type",
"data_kind",
"sent_timestamp"
],
"additionalProperties": false
}

View File

@@ -313,6 +313,10 @@
"type": "integer",
"description": "Cancellation Reason code"
},
"cancelLocation": {
"type": "string",
"description": "Location at which the train was cancelled - Only valid when 'cancelReason' is defined, and even then optional"
},
"locations": {
"type": "object",
"additionalProperties": false,