-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapc.schema.json
135 lines (134 loc) · 5.34 KB
/
apc.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://waltti.fi/schema/bundle/1-0-0/apc.schema.json",
"title": "APC results",
"description": "Automatic passenger counting (APC) results per stop and trip.",
"properties": {
"schemaVersion": {
"description": "The SchemaVer version number of the JSON schema that this message follows. A valid value is for example '1-0-0'.",
"type": "string",
"minLength": 5
},
"authorityId": {
"description": "Authority ID as used by Waltti, e.g. '203' for Hämeenlinna. Identifiers listed here: https://opendata.waltti.fi/docs#gtfs-static-packages .",
"type": "string",
"minLength": 1
},
"timezoneName": {
"description": "Timezone identifier for the GTFS Realtime trip details as defined by the tz (IANA) database. A valid value would be e.g. 'Europe/Helsinki'.",
"type": "string",
"minLength": 1
},
"gtfsrtTripId": {
"description": "trip_id from the GTFS Realtime specification: https://gtfs.org/realtime/reference/#message-tripdescriptor",
"type": "string",
"minLength": 1
},
"gtfsrtStartDate": {
"description": "start_date from the GTFS Realtime specification: https://gtfs.org/realtime/reference/#message-tripdescriptor . Operating date might be longer than 24 hours.",
"type": "string",
"format": "date",
"minLength": 1
},
"gtfsrtStartTime": {
"description": "start_time from the GTFS Realtime specification: https://gtfs.org/realtime/reference/#message-tripdescriptor . Operating date might be longer than 24 hours.",
"type": "string",
"minLength": 1
},
"gtfsrtRouteId": {
"description": "route_id from the GTFS Realtime specification: https://gtfs.org/realtime/reference/#message-tripdescriptor .",
"type": "string",
"minLength": 1
},
"gtfsrtDirectionId": {
"description": "direction_id from the GTFS Realtime specification: https://gtfs.org/realtime/reference/#message-tripdescriptor .",
"type": "integer"
},
"gtfsrtCurrentStopSequence": {
"description": "current_stop_sequence from the GTFS Realtime specification: https://gtfs.org/realtime/reference/#message-vehicleposition .",
"type": "integer",
"minimum": 0
},
"gtfsrtStopId": {
"description": "stop_id from the GTFS Realtime specification: https://gtfs.org/realtime/reference/#message-vehicleposition .",
"type": "string",
"minLength": 1
},
"gtfsrtVehicleId": {
"description": "Vehicle ID i.e. VehicleDescriptor.id from the GTFS Realtime specification: https://gtfs.org/realtime/reference/#message-vehicledescriptor .",
"type": "string",
"minLength": 1
},
"utcStartTime": {
"description": "A timestamp for the start time including the date. Unlike gtfsrtStartDate and gtfsrtStartTime, this value follows the usual Gregorian calendar so that outside of leap seconds there is exactly one timestamp representation for each moment in time. The value is an ISO 8601 UTC timestamp in the strftime format '%Y-%m-%dT%H:%M:%SZ'. A valid value would be e.g. '2021-11-22T10:57:08Z'. Use 24-hour linear smear from noon to noon UTC for leap seconds, like Google: https://developers.google.com/time/smear .",
"type": "string",
"format": "date-time",
"minLength": 1
},
"countingDeviceId": {
"description": "An ID for the onboard APC system in one vehicle.",
"type": "string",
"minLength": 1
},
"countingVendorName": {
"description": "The name of the APC vendor that is responsible for this counting device.",
"type": "string",
"minLength": 1
},
"countQuality": {
"description": "Information on the quality of the counting result, as described by the ITxPT standard.",
"enum": ["regular", "defect", "other"]
},
"doorClassCounts": {
"items": {
"properties": {
"doorName": {
"description": "Identification of the door. The door closest to the front of a bus is '1'. The next door is '2' etc. The string type allows us to use this field later for unordered door names, for example in trains.",
"type": "string",
"minLength": 1
},
"countClass": {
"description": "Passenger type as described by ITxPT.",
"type": "string",
"enum": ["adult", "child", "pram", "bike", "wheelchair", "other"]
},
"in": {
"description": "Number of passengers having boarded",
"type": "integer",
"minimum": 0
},
"out": {
"description": "Number of passengers having alighted",
"type": "integer",
"minimum": 0
}
},
"type": "object",
"additionalProperties": true,
"required": ["countClass", "doorName", "in", "out"]
},
"type": "array",
"minItems": 1,
"uniqueItems": true
}
},
"type": "object",
"additionalProperties": true,
"required": [
"authorityId",
"countQuality",
"countingDeviceId",
"countingVendorName",
"doorClassCounts",
"gtfsrtDirectionId",
"gtfsrtRouteId",
"gtfsrtStartDate",
"gtfsrtStartTime",
"gtfsrtStopId",
"gtfsrtCurrentStopSequence",
"gtfsrtTripId",
"gtfsrtVehicleId",
"timezoneName",
"utcStartTime"
]
}