Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 56aae55f16 | |||
| 91abe29b62 | |||
| c22f3c7230 | |||
| 311ff3798f | |||
| a869935241 | |||
| 6cf6ea8aef |
119
schemas/data-ingress/knowledgebase/kb-stations.json
Normal file
119
schemas/data-ingress/knowledgebase/kb-stations.json
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
{
|
||||||
|
"$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",
|
||||||
|
"mc",
|
||||||
|
"l",
|
||||||
|
"o",
|
||||||
|
"p",
|
||||||
|
"a",
|
||||||
|
"r",
|
||||||
|
"d"
|
||||||
|
],
|
||||||
|
"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": "string",
|
||||||
|
"name": "Address",
|
||||||
|
"description": "The address of the station"
|
||||||
|
},
|
||||||
|
"p": {
|
||||||
|
"type": "string",
|
||||||
|
"name": "Postcode",
|
||||||
|
"description": "The public postcode of the station"
|
||||||
|
},
|
||||||
|
"l": {
|
||||||
|
"type": "object",
|
||||||
|
"name": "Location",
|
||||||
|
"description": "LatLon of the station",
|
||||||
|
"required": ["lt", "ln"],
|
||||||
|
"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",
|
||||||
|
"payload"
|
||||||
|
],
|
||||||
|
"additionalProperties": false
|
||||||
|
}
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
},
|
},
|
||||||
"data_kind": {
|
"data_kind": {
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"enum": ["pis", "timetable", "knowledgebase", "PushPort16Schedule", "darwin_ts", "darwin_ref"],
|
"enum": ["pis", "timetable", "kb-stations", "PushPort16Schedule", "darwin_ts", "darwin_ref"],
|
||||||
"description": "The data type contained in the message. Currently supported PIS: PIS Data, Timetable: CIF or VSTP Data, Knowledgebase: Station Data"
|
"description": "The data type contained in the message. Currently supported PIS: PIS Data, Timetable: CIF or VSTP Data, Knowledgebase: Station Data"
|
||||||
},
|
},
|
||||||
"payload": {}
|
"payload": {}
|
||||||
|
|||||||
@@ -313,6 +313,10 @@
|
|||||||
"type": "integer",
|
"type": "integer",
|
||||||
"description": "Cancellation Reason code"
|
"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": {
|
"locations": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"additionalProperties": false,
|
"additionalProperties": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user