4 Commits

Author SHA1 Message Date
06e6bceb59 Final Draft of 16schedule.json
All checks were successful
Generate and Release Protos / release (push) Successful in 36s
2026-02-25 16:21:40 +00:00
315be1af57 Lost in schema translation! 2026-02-24 21:23:16 +00:00
c9f328bb58 Ensure that data_kind it not optinal
All checks were successful
Generate and Release Protos / release (push) Successful in 30s
2026-02-24 11:56:53 +00:00
355494fc97 Add payload key to MessageEnvelope
All checks were successful
Generate and Release Protos / release (push) Successful in 30s
2026-02-24 11:50:00 +00:00
3 changed files with 271 additions and 3 deletions

View File

@@ -25,8 +25,9 @@
"type": "string",
"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"
}
},
"payload": {}
},
"required": ["service_name", "service_id", "data_type", "sent_timestamp"],
"additionalProperties": true
"required": ["service_name", "service_id", "data_type", "data_kind", "sent_timestamp"],
"additionalProperties": false
}

View File

@@ -0,0 +1,267 @@
{
"$id": "https://schema.owlboard.info/data-ingress/pushport16-schedule.schema.json",
"$schema": "https://json-schema.org/draft-07/schema#",
"title": "PushPortSchedule",
"description": "Consolidated object definition for Darwin Schedule messages",
"definitions": {
"SchedLocAttributes": {
"type": "object",
"description": "Attributes common to all schedule locations",
"required": [
"tpl"
],
"properties": {
"tpl": {
"type": "string",
"description": "TIPLOC"
},
"act": {
"type": "string",
"default": " ",
"description": "Current Activity Codes"
},
"planAct": {
"type": "string",
"description": "Planned Activity Codes"
},
"can": {
"type": "boolean",
"default": false,
"description": "Cancelled flag"
},
"fid": {
"type": "string",
"description": "Unique identifier of the formation data (v3) "
}
}
},
"CallPtAttributes": {
"type": "object",
"description": "Attributes for Calling Points (Optional for Operational variants)",
"properties": {
"pta": {
"type": "string",
"description": "Public Scheduled Time of Arrival"
},
"ptd": {
"type": "string",
"description": "Public Scheduled Time of Departure"
},
"avgLoading": {
"type": "string",
"description": "Average Loading value based on long-term averages (v3) "
}
}
},
"originPoint": {
"description": "Merged Origin (OR / OPOR). The starting point of the journey.",
"required": [
"wtd"
],
"allOf": [
{
"$ref": "#/definitions/SchedLocAttributes"
},
{
"$ref": "#/definitions/CallPtAttributes"
},
{
"type": "object",
"properties": {
"wta": {
"type": "string",
"description": "Working Scheduled Time of Arrival (Optional)"
},
"wtd": {
"type": "string",
"description": "Working Scheduled Time of Departure (Required)"
},
"fd": {
"type": "string",
"description": "False Destination TIPLOC (Passenger only)"
}
}
}
]
},
"callingPoint": {
"description": "Merged Intermediate Point (IP / OPIP). An intermediate stop requiring dwell time.",
"required": [
"wta",
"wtd"
],
"allOf": [
{
"$ref": "#/definitions/SchedLocAttributes"
},
{
"$ref": "#/definitions/CallPtAttributes"
},
{
"type": "object",
"properties": {
"wta": {
"type": "string",
"description": "Working Scheduled Time of Arrival (Required)"
},
"wtd": {
"type": "string",
"description": "Working Scheduled Time of Departure (Required)"
},
"rdelay": {
"type": "integer",
"default": 0,
"description": "Route delay value"
},
"fd": {
"type": "string",
"description": "False Destination (Passenger only)"
}
}
}
]
},
"passPoint": {
"description": "Intermediate Passing Point (PP). Purely operational.",
"required": [
"wtp"
],
"allOf": [
{
"$ref": "#/definitions/SchedLocAttributes"
},
{
"type": "object",
"properties": {
"wtp": {
"type": "string",
"description": "Working Scheduled Time of Passing (Required)"
},
"rdelay": {
"type": "integer",
"default": 0,
"description": "Route delay value"
}
},
"additionalProperties": false
}
]
},
"destinationPoint": {
"description": "Merged Destination (DT / OPDT). The termination point of the journey.",
"required": [
"wta"
],
"allOf": [
{
"$ref": "#/definitions/SchedLocAttributes"
},
{
"$ref": "#/definitions/CallPtAttributes"
},
{
"type": "object",
"properties": {
"wta": {
"type": "string",
"description": "Working Scheduled Time of Arrival (Required)"
},
"wtd": {
"type": "string",
"description": "Working Scheduled Time of Departure (Optional)"
},
"rdelay": {
"type": "integer",
"default": 0,
"description": "Route delay value"
}
}
}
]
}
},
"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": "PushPort16Schedule",
"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": "PushPort16Schedule",
"description": "The data type contained in the message. Currently supported PIS: PIS Data, Timetable: CIF or VSTP Data, Knowledgebase: Station Data"
},
"payload": {
"type": "object",
"required": [
"rid",
"uid",
"trainId",
"ssd",
"toc",
"locations"
],
"properties": {
"rid": {"type": "string", "description": "Rail Identifier - Unique value for the service"},
"uid": {"type": "string", "description": "Unique ID - Unique value for the timetable entry - maps to Network Rail CIF schedules"},
"ssd": {"type": "string", "format": "date", "description": "Service Start Date - The date the service commences"},
"trainId": {"type": "string", "description": "Headcode"},
"toc": {"type": "string", "minLength": 2, "maxLength": 2, "description": "Train Operator (ATOC Code)"},
"rsid": {"type": "string", "description": "Retail Service ID"},
"status": {"type": "string", "default": "P", "description": "P = Permanent, L = Long Term, S = Short Term"},
"trainCat": {"type": "string", "default": "OO", "description": "Train Category"},
"isPassenger": {"type": "boolean", "default": true, "description": "Declares the service as a passenger service"},
"isActive": {"type": "boolean", "default": false, "description": "UNKNOWN"},
"isCharter": {"type": "boolean", "default": false, "description": "Declares the service as a charter service"},
"cancelReason": {"type": "integer", "description": "Cancellation Reason code"},
"locations": {
"type": "object",
"description": "Merged and flattened location objects",
"properties": {
"OR": {
"type": "array",
"description": "OR/OPOR Values - Trains Origin",
"items": {"$ref": "#/definitions/originPoint"}
},
"IP": {
"type": "array",
"description": "IP/OPIP Values - Intermediate Points",
"items": {"$ref": "#/definitions/callingPoint"}
},
"PP": {
"type": "array",
"description": "Passing Points (Non-stop)",
"items": {"$ref": "#/definitions/passPoint"}
},
"DT": {
"type": "array",
"description": "DT/OPDT Values - Trains Destination",
"items": {"$ref": "#/definitions/destinationPoint"}
}
}
}
}
}
},
"required": [
"service_name",
"service_id",
"data_type",
"sent_timestamp"
],
"additionalProperties": false
}

View File