Skip to content

Commit 0545510

Browse files
committed
update schemas with stop_id reference
1 parent fb86a6b commit 0545510

5 files changed

Lines changed: 22 additions & 2 deletions

File tree

provider/events.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
"properties": {
7070
"timestamp": {
7171
"$ref": "#/definitions/timestamp"
72+
},
73+
"stop_id": {
74+
"$ref": "#/definitions/uuid"
7275
}
7376
}
7477
},

provider/status_changes.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
"properties": {
7070
"timestamp": {
7171
"$ref": "#/definitions/timestamp"
72+
},
73+
"stop_id": {
74+
"$ref": "#/definitions/uuid"
7275
}
7376
}
7477
},

provider/trips.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
"properties": {
7070
"timestamp": {
7171
"$ref": "#/definitions/timestamp"
72+
},
73+
"stop_id": {
74+
"$ref": "#/definitions/uuid"
7275
}
7376
}
7477
},

provider/vehicles.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@
6969
"properties": {
7070
"timestamp": {
7171
"$ref": "#/definitions/timestamp"
72+
},
73+
"stop_id": {
74+
"$ref": "#/definitions/uuid"
7275
}
7376
}
7477
},

schema/generate_schemas.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -325,8 +325,16 @@ def provider_schema(endpoint, common_definitions, extra_definitions={}):
325325
title = "MDS GeoJSON Feature Point",
326326
# Only allow GeoJSON Point feature geometry
327327
geometry = { "$ref": definition_id("Point") },
328-
# Point features *must* include a `timestamp` property.
329-
properties = { "timestamp": { "$ref": definition_id("timestamp") } },
328+
properties = {
329+
"timestamp": {
330+
"$ref": definition_id("timestamp")
331+
},
332+
# Locations corresponding to Stops must include a `stop_id` reference
333+
"stop_id": {
334+
"$ref": definition_id("uuid")
335+
}
336+
},
337+
# Point features *must* include the `timestamp`
330338
required = ["timestamp"]
331339
)
332340

0 commit comments

Comments
 (0)