From f882cf47306b7516dc20fafbe0f164fc97c3a0c2 Mon Sep 17 00:00:00 2001 From: Josee Sabourin <66266820+josee-sabourin@users.noreply.github.com> Date: Tue, 27 Oct 2020 12:59:40 -0400 Subject: [PATCH] Add schemas for v2.0 (#33) Change booleans from 1/0 to true/false Rotate bike_id --- free_bike_status.json | 13 ++++--------- station_status.json | 16 ++++------------ system_pricing_plans.json | 9 ++++----- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/free_bike_status.json b/free_bike_status.json index 34bfcb88..60ea112d 100644 --- a/free_bike_status.json +++ b/free_bike_status.json @@ -18,8 +18,7 @@ "description": "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).", "type": "string", "enum": [ - "1.1-RC", - "1.1" + "2.0" ] }, "data": { @@ -30,7 +29,7 @@ "type": "array", "items": { "bike_id": { - "description": "Identifier of a vehicle.", + "description": "Rotating (as of v2.0) identifier of a vehicle.", "type": "string" }, "lat": { @@ -47,15 +46,11 @@ }, "is_reserved": { "description": "Is the vehicle currently reserved?", - "type": "number", - "minimum": 0, - "maximum": 1 + "type": "boolean" }, "is_disabled": { "description": "Is the vehicle currently disabled (broken)?", - "type": "number", - "minimum": 0, - "maximum": 1 + "type": "boolean" }, "rental_uris": { "description": "Contains rental uris for Android, iOS, and web in the android, ios, and web fields (added in v1.1).", diff --git a/station_status.json b/station_status.json index 1fc16434..2a6c4832 100644 --- a/station_status.json +++ b/station_status.json @@ -18,8 +18,7 @@ "description": "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).", "type": "string", "enum": [ - "1.1-RC", - "1.1" + "2.0" ] }, "data": { @@ -55,21 +54,15 @@ }, "is_installed": { "description": "Is the station currently on the street?", - "type": "number", - "minimum": 0, - "maximum": 1 + "type": "boolean" }, "is_renting": { "description": "Is the station currently renting vehicles?", - "type": "number", - "minimum": 0, - "maximum": 1 + "type": "boolean" }, "is_returning": { "description": "Is the station accepting vehicle returns?", - "type": "number", - "minimum": 0, - "maximum": 1 + "type": "boolean" }, "last_reported": { "description": "The last time this station reported its status to the operator's backend.", @@ -80,7 +73,6 @@ "required": [ "station_id", "num_bikes_available", - "num_docks_available", "is_installed", "is_renting", "is_returning", diff --git a/system_pricing_plans.json b/system_pricing_plans.json index 672af454..e7f50b14 100644 --- a/system_pricing_plans.json +++ b/system_pricing_plans.json @@ -18,8 +18,9 @@ "description": "GBFS version number to which the feed conforms, according to the versioning framework (added in v1.1).", "type": "string", "enum": [ - "1.1-RC", - "1.1" + "2.0-RC", + "2.0", + "2.1-RC" ] }, "data": { @@ -54,9 +55,7 @@ }, "is_taxable": { "description": "Will additional tax be added to the base price?", - "type": "number", - "minimum": 0, - "maximum": 1 + "type": "boolean" }, "description": { "description": "Customer-readable description of the pricing plan.",