diff --git a/schemas/data-ingress/message-envelope.json b/schemas/data-ingress/message-envelope.json index c644208..a006f50 100644 --- a/schemas/data-ingress/message-envelope.json +++ b/schemas/data-ingress/message-envelope.json @@ -23,7 +23,7 @@ }, "data_kind": { "type": "string", - "enum": ["pis", "timetable", "knowledgebase"], + "enum": ["pis", "timetable", "knowledgebase", "darwin_schedule", "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" } }, diff --git a/schemas/data-ingress/pushport/schedule.json b/schemas/data-ingress/pushport/schedule.json new file mode 100644 index 0000000..85e0ec4 --- /dev/null +++ b/schemas/data-ingress/pushport/schedule.json @@ -0,0 +1,39 @@ +{ + "$id": "https://schema.owlboard.info/data-ingress/pushport-schedule.schema.json", + "$schema": "https://json-schema.org/draft-07/schema#", + "title": "PushPortSchedule", + "type": "object", + "required": ["rid", "uid", "trainId", "ssd", "toc", "locations"], + "properties": { + "rid": {"type": "string", "description": "Unique service ID"}, + "uid": {"type": "string", "description": "Unique schedule ID - maps to NR CIF"}, + "trainId": {"type": "string", "description": "Train Headcode"}, + "ssd": {"type": "string", "format": "date", "description": "Schedule Start Date (When the service commences)"}, + "toc": {"type": "string", "minLength": 2, "maxLength": 2, "description": "TOC Code"}, + "isPassenger": {"type": "boolean", "description": "If service is for passengers", "default": true}, + "isCharter": {"type": "boolean", "description": "If train is charter service", "default": false}, + "status": {"type": "string", "enum": ["train", "bus", "ship"], "default": "train"}, + "isDelayedDelivery": {"type": "boolean", "description": "If message is sent as part of Darwin service recovery"}, + "cancelReason": {"type": ["string", "null"], "description": "Reason code for cancellation"}, + "isDeleted": {"type": "boolean", "description": "Whether schedule should be deleted", "default": false}, + "locations": { + "type": "array", + "items": { + "type": "object", + "required": ["tpl", "seq"], + "properties": { + "tpl": {"type": "string", "description": "TIPLOC of location"}, + "seq": {"type": "integer", "description": "The order of the stop for sorting and handling repeated TIPLOCs"}, + "wta": { "type": ["string", "null"] }, + "wtd": { "type": ["string", "null"] }, + "wtp": { "type": ["string", "null"] }, + "pta": { "type": ["string", "null"] }, + "ptd": { "type": ["string", "null"] }, + "plat": { "type": ["string", "null"] }, + "isCancelled": { "type": "boolean", "default": false }, + "activities": { "type": "string" } + } + } + } + } +} \ No newline at end of file