From 49b74f823aeeca63c9018638f83a02b73ee91365 Mon Sep 17 00:00:00 2001 From: Fabien Richard-Allouard Date: Tue, 12 Dec 2023 14:35:40 +0100 Subject: [PATCH] Fix examples (#575) (#577) * Fix json * Fix examples to make them conform to json/GBFS specification * Update version in examples * Internationalization of free-form text --------- Signed-off-by: Tom <1955774+tdelmas@users.noreply.github.com> Co-authored-by: Tom <1955774+tdelmas@users.noreply.github.com> --- gbfs.md | 88 +++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 60 insertions(+), 28 deletions(-) diff --git a/gbfs.md b/gbfs.md index 42e4287f..6b2b2b94 100644 --- a/gbfs.md +++ b/gbfs.md @@ -266,9 +266,14 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 3600, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { - "name": "Example Bike Rental", + "name": [ + { + "text": "Example Bike Rental", + "language": "en" + } + ], "system_id": "example_cityname", "timezone": "America/Chicago", "languages": ["en"] @@ -292,7 +297,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "feeds": [ { @@ -379,7 +384,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "versions": [ { @@ -387,7 +392,7 @@ Field Name | REQUIRED | Type | Defines "url": "https://www.example.com/gbfs/2/gbfs" }, { - "version": "3.0-RC", + "version": "3.0-RC2", "url": "https://www.example.com/gbfs/3/gbfs" } ] @@ -444,7 +449,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 1800, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "system_id": "example_cityname", "languages": ["en"], @@ -556,7 +561,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "vehicle_types": [ { @@ -609,7 +614,7 @@ Field Name | REQUIRED | Type | Defines "icon_last_modified": "2021-06-15" }, "default_pricing_plan_id": "cargo_plan_1", - "pricing_plans_ids": [ + "pricing_plan_ids": [ "cargo_plan_1", "cargo_plan_2", "cargo_plan_3" @@ -680,7 +685,7 @@ Field Name | REQUIRED | Type | Defines "model": [ { "text": "Clio", - "language": "en", + "language": "en" } ], "color": "white", @@ -739,7 +744,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "stations": [ { @@ -775,7 +780,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "stations": [ { @@ -867,7 +872,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "stations": [ { @@ -1071,7 +1076,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 86400, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "regions": [ { @@ -1151,7 +1156,7 @@ The user does not pay more than the base price for the first 10 km. After 10 km { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "plans": [ { @@ -1204,7 +1209,7 @@ This example demonstrates a pricing scheme that has a rate both by minute and by { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 0, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "plans": [ { @@ -1270,7 +1275,7 @@ Field Name | REQUIRED | Type | Defines { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "alerts": [ { @@ -1305,7 +1310,7 @@ Field Name | REQUIRED | Type | Defines "language": "en" } ], - "last_updated": "2023-07-17T13:34:13+02:00", + "last_updated": "2023-07-17T13:34:13+02:00" } ] } @@ -1367,7 +1372,7 @@ See examples below. { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "geofencing_zones": { "type": "FeatureCollection", @@ -1653,17 +1658,24 @@ Other supported parameters include: { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { - "name": "Example Bike Rental", + "name": [ + { + "text": "Example Bike Rental", + "language": "en" + } + ], "system_id": "example_cityname", "timezone": "America/Chicago", "languages": ["en"], "rental_apps": { "android": { + "store_uri": "https://play.google.com/store/apps/details?id=com.example.android", "discovery_uri": "com.example.android://" }, "ios": { + "store_uri": "https://apps.apple.com/app/apple-store/id123456789", "discovery_uri": "com.example.ios://" } } @@ -1677,12 +1689,17 @@ Other supported parameters include: { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "stations": [ { "station_id": "425", - "name": "Coppertail", + "name": [ + { + "text": "Coppertail", + "language": "en" + } + ], "lat": 27.956333, "lon": -82.430436, "rental_uris": { @@ -1705,9 +1722,14 @@ Note that the Android URI and iOS Universal Link URLs do not necessarily use the { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { - "name": "Example Bike Rental", + "name": [ + { + "text": "Example Bike Rental", + "language": "en" + } + ], "system_id": "example_cityname", "timezone": "America/Chicago", "languages": ["en"], @@ -1731,12 +1753,17 @@ Note that the Android URI and iOS Universal Link URLs do not necessarily use the { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "stations": [ { "station_id": "425", - "name": "Coppertail", + "name": [ + { + "text": "Coppertail", + "language": "en" + } + ], "lat": 27.956333, "lon": -82.430436, "rental_uris":{ @@ -1757,12 +1784,17 @@ Note that the Android URI and iOS Universal Link URLs do not necessarily use the { "last_updated": "2023-07-17T13:34:13+02:00", "ttl": 60, - "version": "3.0-RC", + "version": "3.0-RC2", "data": { "stations": [ { "station_id": "425", - "name": "Coppertail", + "name": [ + { + "text": "Coppertail", + "language": "en" + } + ], "lat": 27.956333, "lon": -82.430436, "rental_uris": {