1 Commits

Author SHA1 Message Date
4ab05ba738 Adjust declarations and remove uses of the allOf function to assist with type generation
All checks were successful
Generate and Release Protos / release (push) Successful in 38s
2026-02-27 20:18:57 +00:00
2 changed files with 223 additions and 129 deletions

View File

@@ -4,12 +4,13 @@
"title": "PushPortSchedule",
"description": "Consolidated object definition for Darwin Schedule messages",
"definitions": {
"SchedLocAttributes": {
"type": "object",
"description": "Attributes common to all schedule locations",
"originPoint": {
"description": "Merged Origin (OR / OPOR). The starting point of the journey.",
"required": [
"wtd",
"tpl"
],
"type": "object",
"properties": {
"tpl": {
"type": "string",
@@ -32,13 +33,7 @@
"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"
@@ -50,134 +45,181 @@
"avgLoading": {
"type": "string",
"description": "Average Loading value based on long-term averages (v3) "
},
"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)"
}
}
},
"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"
"wtd",
"tpl"
],
"allOf": [
{
"$ref": "#/definitions/SchedLocAttributes"
"type": "object",
"properties": {
"tpl": {
"type": "string",
"description": "TIPLOC"
},
{
"$ref": "#/definitions/CallPtAttributes"
"act": {
"type": "string",
"default": " ",
"description": "Current Activity Codes"
},
{
"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)"
}
}
"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) "
},
"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) "
},
"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"
"wtp",
"tpl"
],
"allOf": [
{
"$ref": "#/definitions/SchedLocAttributes"
"type": "object",
"properties": {
"tpl": {
"type": "string",
"description": "TIPLOC"
},
{
"type": "object",
"properties": {
"wtp": {
"type": "string",
"description": "Working Scheduled Time of Passing (Required)"
},
"rdelay": {
"type": "integer",
"default": 0,
"description": "Route delay value"
}
},
"additionalProperties": false
"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) "
},
"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"
"wta",
"tpl"
],
"allOf": [
{
"$ref": "#/definitions/SchedLocAttributes"
"type": "object",
"properties": {
"tpl": {
"type": "string",
"description": "TIPLOC"
},
{
"$ref": "#/definitions/CallPtAttributes"
"act": {
"type": "string",
"default": " ",
"description": "Current Activity Codes"
},
{
"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"
}
}
"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) "
},
"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) "
},
"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",
@@ -215,42 +257,94 @@
"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"},
"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",
"additionalProperties": false,
"description": "Merged and flattened location objects",
"properties": {
"OR": {
"type": "array",
"description": "OR/OPOR Values - Trains Origin",
"items": {"$ref": "#/definitions/originPoint"}
"items": {
"$ref": "#/definitions/originPoint"
}
},
"IP": {
"type": "array",
"description": "IP/OPIP Values - Intermediate Points",
"items": {"$ref": "#/definitions/callingPoint"}
"items": {
"$ref": "#/definitions/callingPoint"
}
},
"PP": {
"type": "array",
"description": "Passing Points (Non-stop)",
"items": {"$ref": "#/definitions/passPoint"}
"items": {
"$ref": "#/definitions/passPoint"
}
},
"DT": {
"type": "array",
"description": "DT/OPDT Values - Trains Destination",
"items": {"$ref": "#/definitions/destinationPoint"}
"items": {
"$ref": "#/definitions/destinationPoint"
}
}
}
}