Skip to content

Commit 045a64a

Browse files
committed
common definitions for stops
1 parent f28bff4 commit 045a64a

2 files changed

Lines changed: 163 additions & 6 deletions

File tree

general-information.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ All String fields, such as `vehicle_id`, are limited to a maximum of 255 charact
168168

169169
## Stops
170170

171-
**Stops** describe vehicle trip end locations in a pre-designated physical place. They can vary from docking stations with or without charging, corrals with lock-to railings, or suggested parking areas marked with spray paint. **Stops** are used in both [Provider](/provider#stops) (including routes and event locations) and [Agency](/agency#stops) (including telemetry data).
171+
Stops describe vehicle trip start and end locations in a pre-designated physical place. They can vary from docking stations with or without charging, corrals with lock-to railings, or suggested parking areas marked with spray paint. Stops are used in both [Provider](/provider#stops) (including routes and event locations) and [Agency](/agency#stops) (including telemetry data).
172172

173173
| Field | Type | Required/Optional | Description |
174174
|------------------------|-------------------------------------------------------------|-------------------|----------------------------------------------------------------------------------------------|
@@ -180,13 +180,13 @@ All String fields, such as `vehicle_id`, are limited to a maximum of 255 charact
180180
| capacity | {vehicle_type: number} | Required | Number of total spaces per vehicle_type |
181181
| num_vehicles_available | {vehicle_type: number} | Required | How many vehicles are available per vehicle_type at this stop? |
182182
| num_vehicles_disabled | {vehicle_type: number} | Required | How many vehicles are unavailable/reserved per vehicle_type at this stop? |
183-
| managed_by | UUID | Optional | `provider_id` for the provider which manages this stop. null/undefined if city managed. |
183+
| provider_id | UUID | Optional | UUID for the Provider managing this stop. Null/undefined if managed by an Agency. |
184184
| geography_id | UUID | Optional | Pointer to the Geography that represents the Stop geospatially |
185185
| region_id | string | Optional | ID of the region where station is located, see [GBFS Station Information][gbfs-station-info] |
186186
| short_name | String | Optional | Abbreviated stop name |
187187
| address | String | Optional | Postal address (useful for directions) |
188188
| post_code | String | Optional | Postal code (e.g. `10036`) |
189-
| rental_methods | [Enum][gbfs-station-info] | Optional | Payment methods accepted at stop, see [GBFS Rental Methods][gbfs-station-info] |
189+
| rental_methods | [Enum[]][gbfs-station-info] | Optional | List of payment methods accepted at stop, see [GBFS Rental Methods][gbfs-station-info] |
190190
| cross_street | String | Optional | Cross street of where the station is located. |
191191
| num_spaces_available | {vehicle_type: number} | Optional | How many spaces are free to be populated with vehicles at this stop? |
192192
| num_spaces_disabled | {vehicle_type: number} | Optional | How many spaces are disabled and unable to accept vehicles at this stop? |
@@ -206,11 +206,11 @@ All String fields, such as `vehicle_id`, are limited to a maximum of 255 charact
206206
Example of the **Stop Status** object with properties listed:
207207

208208
```json
209-
{
209+
{
210210
"is_installed": true,
211211
"is_renting": false,
212212
"is_returning": true
213-
}
213+
}
214214
```
215215

216216
### GBFS Compatibility

schema/templates/common.json

Lines changed: 158 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,163 @@
8989
"uniqueItems": true,
9090
"minItems": 1
9191
},
92+
"rental_methods": {
93+
"$id": "#/definitions/rental_methods",
94+
"type": "array",
95+
"description": "Payment methods accepted at this Stop. From GBFS Station Information.",
96+
"items": {
97+
"enum": [
98+
"KEY",
99+
"CREDITCARD",
100+
"PAYPASS",
101+
"APPLEPAY",
102+
"ANDROIDPAY",
103+
"TRANSITCARD",
104+
"ACCOUNTNUMBER",
105+
"PHONE"
106+
]
107+
},
108+
"uniqueItems": true
109+
},
110+
"stop": {
111+
"$id": "#/definitions/stop",
112+
"type": "object",
113+
"description": "The common schema elements for a Stop in MDS",
114+
"required": [
115+
"stop_id",
116+
"name",
117+
"last_reported",
118+
"location",
119+
"status",
120+
"capacity",
121+
"num_vehicles_available",
122+
"num_vehicles_disabled"
123+
],
124+
"properties": {
125+
"stop_id": {
126+
"$id": "#/definitions/stop/properties/stop_id",
127+
"$ref": "#/definitions/uuid",
128+
"description": "UUID for the Stop"
129+
},
130+
"name": {
131+
"$id": "#/definitions/stop/properties/name",
132+
"$ref": "#/definitions/string",
133+
"description": "Name of the Stop"
134+
},
135+
"last_reported": {
136+
"$id": "#/definitions/stop/properties/last_reported",
137+
"$ref": "#/definitions/timestamp",
138+
"description": "Date/Time of the last status update for this Stop"
139+
},
140+
"location": {
141+
"$id": "#/definitions/stop/properties/location",
142+
"$ref": "#/definitions/MDS_Feature_Point",
143+
"description": "Location of the stop"
144+
},
145+
"status": {
146+
"$id": "#/definitions/stop/properties/status",
147+
"$ref": "#/definitions/stop_status",
148+
"description": "The status of the Stop"
149+
},
150+
"capacity": {
151+
"$id": "#/definitions/stop/properties/capacity",
152+
"$ref": "#/definitions/vehicle_type_counts",
153+
"description": "Number of total spaces per vehicle_type"
154+
},
155+
"num_vehicles_available": {
156+
"$id": "#/definitions/stop/properties/num_vehicles_available",
157+
"$ref": "#/definitions/vehicle_type_counts",
158+
"description": "Number of available vehicles per vehicle_type"
159+
},
160+
"num_vehicles_disabled": {
161+
"$id": "#/definitions/stop/properties/num_vehicles_disabled",
162+
"$ref": "#/definitions/vehicle_type_counts",
163+
"description": "Number of non_operational/reserved vehicles per vehicle_type"
164+
},
165+
"provider_id": {
166+
"$id": "#/definitions/stop/properties/provider_id",
167+
"$ref": "#/definitions/uuid",
168+
"description": "UUID for the Provider managing this Stop. Null/undefined if managed by an Agency."
169+
},
170+
"geography_id": {
171+
"$id": "#/definitions/stop/properties/geography_id",
172+
"$ref": "#/definitions/uuid",
173+
"description": "UUID for the Stop"
174+
},
175+
"region_id": {
176+
"$id": "#/definitions/stop/properties/region_id",
177+
"$ref": "#/definitions/string",
178+
"description": "ID of the region where the Stop is located. See GBFS Station Information."
179+
},
180+
"short_name": {
181+
"$id": "#/definitions/stop/properties/short_name",
182+
"$ref": "#/definitions/string",
183+
"description": "Abbreviated Stop name"
184+
},
185+
"address": {
186+
"$id": "#/definitions/stop/properties/address",
187+
"$ref": "#/definitions/string",
188+
"description": "Postal address (useful for directions)"
189+
},
190+
"post_code": {
191+
"$id": "#/definitions/stop/properties/post_code",
192+
"$ref": "#/definitions/string",
193+
"description": "Postal code (e.g. 10036)"
194+
},
195+
"cross_street": {
196+
"$id": "#/definitions/stop/properties/cross_street",
197+
"$ref": "#/definitions/string",
198+
"description": "Cross street of where Stop is located"
199+
},
200+
"num_spaces_available": {
201+
"$id": "#/definitions/stop/properties/num_spaces_available",
202+
"$ref": "#/definitions/vehicle_type_counts",
203+
"description": "Number of spaces free to be populated per vehicle_type"
204+
},
205+
"num_spaces_disabled": {
206+
"$id": "#/definitions/stop/properties/num_spaces_disabled",
207+
"$ref": "#/definitions/vehicle_type_counts",
208+
"description": "Number of spaces disabled an unable to accept vehicles per vehicle_type"
209+
},
210+
"parent_stop": {
211+
"$id": "#/definitions/stop/properties/parent_stop",
212+
"$ref": "#/definitions/uuid",
213+
"description": "Describe a basic hierarchy of Stops (e.g. a Stop inside a greater Stop)"
214+
},
215+
"devices": {
216+
"$id": "#/definitions/stop/properties/devices",
217+
"type": "array",
218+
"description": "List of device_id for vehicles currently at this Stop.",
219+
"items": {
220+
"$ref": "#/definitions/uuid"
221+
}
222+
}
223+
}
224+
},
225+
"stop_status": {
226+
"$id": "#/definitions/stop_status",
227+
"type": "object",
228+
"description": "Status object for a Stop in MDS",
229+
"required": [
230+
"is_installed",
231+
"is_renting",
232+
"is_returning"
233+
],
234+
"properties": {
235+
"is_installed": {
236+
"$id": "#/definitions/stop_status/properties/is_installed",
237+
"type": "boolean"
238+
},
239+
"is_renting": {
240+
"$id": "#/definitions/stop_status/properties/is_renting",
241+
"type": "boolean"
242+
},
243+
"is_returning": {
244+
"$id": "#/definitions/stop_status/properties/is_returning",
245+
"type": "boolean"
246+
}
247+
}
248+
},
92249
"string": {
93250
"$id": "#/definitions/string",
94251
"type": "string",
@@ -225,7 +382,7 @@
225382
"vehicle": {
226383
"$id": "#/definitions/vehicle",
227384
"type": "object",
228-
"description": "The common schema for Provider vehicle information",
385+
"description": "The common schema elements for a Vehicle in MDS",
229386
"required": [
230387
"provider_name",
231388
"provider_id",

0 commit comments

Comments
 (0)