From 65065a368484109ca394e61c536cdff399023abf Mon Sep 17 00:00:00 2001 From: Alessandro Kreslin Date: Mon, 29 Apr 2024 13:56:42 -0400 Subject: [PATCH] test resources re-added --- .../test/resources/v2_X/free_bike_status.json | 24 ++ .../src/test/resources/v2_X/gbfs.json | 59 +++ .../test/resources/v2_X/gbfs_versions.json | 13 + .../test/resources/v2_X/geofencing_zones.json | 389 ++++++++++++++++++ .../resources/v2_X/station_information.json | 27 ++ .../test/resources/v2_X/station_status.json | 54 +++ .../test/resources/v2_X/system_alerts.json | 23 ++ .../test/resources/v2_X/system_calendar.json | 17 + .../src/test/resources/v2_X/system_hours.json | 27 ++ .../resources/v2_X/system_information.json | 22 + .../resources/v2_X/system_pricing_plans.json | 24 ++ .../test/resources/v2_X/system_regions.json | 13 + .../test/resources/v2_X/vehicle_types.json | 20 + .../src/test/resources/v3_0/gbfs.json | 17 + .../test/resources/v3_0/gbfs_versions.json | 17 + .../test/resources/v3_0/geofencing_zones.json | 98 +++++ .../src/test/resources/v3_0/manifest.json | 35 ++ .../resources/v3_0/station_information.json | 89 ++++ .../test/resources/v3_0/station_status.json | 71 ++++ .../test/resources/v3_0/system_alerts.json | 43 ++ .../resources/v3_0/system_information.json | 68 +++ .../resources/v3_0/system_pricing_plans.json | 78 ++++ .../test/resources/v3_0/system_regions.json | 45 ++ .../test/resources/v3_0/vehicle_status.json | 63 +++ .../test/resources/v3_0/vehicle_types.json | 141 +++++++ 25 files changed, 1477 insertions(+) create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/free_bike_status.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/gbfs.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/gbfs_versions.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/geofencing_zones.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/station_information.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/station_status.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/system_alerts.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/system_calendar.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/system_hours.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/system_information.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/system_pricing_plans.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/system_regions.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v2_X/vehicle_types.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/gbfs.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/gbfs_versions.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/geofencing_zones.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/manifest.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/station_information.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/station_status.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/system_alerts.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/system_information.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/system_pricing_plans.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/system_regions.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/vehicle_status.json create mode 100644 models/java/gbfs-java-model/src/test/resources/v3_0/vehicle_types.json diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/free_bike_status.json b/models/java/gbfs-java-model/src/test/resources/v2_X/free_bike_status.json new file mode 100644 index 00000000..1811fa2b --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/free_bike_status.json @@ -0,0 +1,24 @@ +{ + "last_updated": 1606857968, + "ttl": 300, + "version": "2.2", + "data": { + "bikes": [ + { + "bike_id": "TST:Scooter:1234", + "lat": 59.91465759277344, + "lon": 10.760470390319824, + "is_reserved": false, + "is_disabled": true, + "vehicle_type_id": "TST:VehicleType:Scooter", + "current_range_meters": 1431.2, + "pricing_plan_id": "TST:PricingPlan:Basic", + "rental_uris": { + "android": "test://rentme/TST:Scooter:1234", + "ios": "test://rentme/TST:Scooter:1234", + "web": "https://test.com/rentme/TST:Scooter:1234" + } + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/gbfs.json b/models/java/gbfs-java-model/src/test/resources/v2_X/gbfs.json new file mode 100644 index 00000000..7ba3c583 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/gbfs.json @@ -0,0 +1,59 @@ +{ + "last_updated": 1606727710, + "ttl": 300, + "version": "2.2", + "data": { + "en": { + "feeds": [ + { + "name": "gbfs_versions", + "url": "https://test.com/gbfs_versions" + }, + { + "name": "system_information", + "url": "https://test.com/system_information" + }, + { + "name": "vehicle_types", + "url": "https://test.com/vehicle_types" + }, + { + "name": "station_information", + "url": "https://test.com/station_information" + }, + { + "name": "station_status", + "url": "https://test.com/station_status" + }, + { + "name": "free_bike_status", + "url": "https://test.com/free_bike_status" + }, + { + "name": "system_regions", + "url": "https://test.com/system_regions" + }, + { + "name": "system_pricing_plans", + "url": "https://test.com/system_pricing_plans" + }, + { + "name": "system_hours", + "url": "https://test.com/system_hours" + }, + { + "name": "system_calendar", + "url": "https://test.com/system_calendar" + }, + { + "name": "system_alerts", + "url": "https://test.com/system_alerts" + }, + { + "name": "geofencing_zones", + "url": "https://test.com/geofencing_zones" + } + ] + } + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/gbfs_versions.json b/models/java/gbfs-java-model/src/test/resources/v2_X/gbfs_versions.json new file mode 100644 index 00000000..9f828db9 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/gbfs_versions.json @@ -0,0 +1,13 @@ +{ + "last_updated": 1434054678, + "ttl": 0, + "version": "2.2", + "data": { + "versions": [ + { + "version":"2.2", + "url":"https://test.com/gbfs.json" + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/geofencing_zones.json b/models/java/gbfs-java-model/src/test/resources/v2_X/geofencing_zones.json new file mode 100644 index 00000000..f1780e2e --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/geofencing_zones.json @@ -0,0 +1,389 @@ +{ + "last_updated": 1434054678, + "ttl": 0, + "version": "2.2", + "data": { + "geofencing_zones": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "properties": { + "name": "Nes", + "rules": [ + { + "vehicle_type_ids": [ + "TST:VehicleType:CityBike" + ], + "ride_allowed": true, + "ride_through_allowed": false, + "maximum_speed_kph": 20 + } + ] + }, + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + 11.53037789067, + 60.13740063434 + ], + [ + 11.53372523957, + 60.13598476211 + ], + [ + 11.544177, + 60.132072 + ], + [ + 11.555332, + 60.126844 + ], + [ + 11.567186, + 60.112231 + ], + [ + 11.56403794135, + 60.10918526319 + ], + [ + 11.5629827195, + 60.10773004658 + ], + [ + 11.559217, + 60.101878 + ], + [ + 11.55869921547, + 60.1018221676 + ], + [ + 11.55847, + 60.101506 + ], + [ + 11.55581995556, + 60.10123306033 + ], + [ + 11.555637, + 60.101056 + ], + [ + 11.49821, + 60.095299 + ], + [ + 11.46896, + 60.07201 + ], + [ + 11.465957, + 60.063589 + ], + [ + 11.476578, + 60.059879 + ], + [ + 11.467241, + 60.045013 + ], + [ + 11.436058, + 60.032524 + ], + [ + 11.394385, + 60.029916 + ], + [ + 11.38968940258, + 60.03265856905 + ], + [ + 11.375861, + 60.030292 + ], + [ + 11.365442, + 60.024714 + ], + [ + 11.342163, + 60.03279 + ], + [ + 11.325316, + 60.033807 + ], + [ + 11.31339, + 60.049798 + ], + [ + 11.294868, + 60.063006 + ], + [ + 11.306277, + 60.071862 + ], + [ + 11.325134, + 60.077875 + ], + [ + 11.3179, + 60.093846 + ], + [ + 11.33319, + 60.108785 + ], + [ + 11.332603, + 60.128479 + ], + [ + 11.347831, + 60.138723 + ], + [ + 11.32735488653, + 60.13999842085 + ], + [ + 11.32497308493, + 60.14556400031 + ], + [ + 11.32493016958, + 60.14790318539 + ], + [ + 11.3246405071, + 60.14881370558 + ], + [ + 11.3217544502, + 60.14920087268 + ], + [ + 11.32161497533, + 60.15038904672 + ], + [ + 11.32253764987, + 60.15125678982 + ], + [ + 11.32308482051, + 60.15271988181 + ], + [ + 11.3271295917, + 60.15647876853 + ], + [ + 11.32802007437, + 60.1609739234 + ], + [ + 11.32733336449, + 60.1687562641 + ], + [ + 11.31669035912, + 60.17985540754 + ], + [ + 11.29737845421, + 60.18267228561 + ], + [ + 11.30046835899, + 60.19009744236 + ], + [ + 11.32081023216, + 60.19607048737 + ], + [ + 11.32132521629, + 60.19820345431 + ], + [ + 11.31720534325, + 60.19944051162 + ], + [ + 11.31566039085, + 60.20404707345 + ], + [ + 11.31428709984, + 60.20660599502 + ], + [ + 11.30793562889, + 60.21197908067 + ], + [ + 11.29720679283, + 60.21342881013 + ], + [ + 11.29205695152, + 60.22250948067 + ], + [ + 11.27961150169, + 60.21641334548 + ], + [ + 11.25377646446, + 60.25220658872 + ], + [ + 11.30664816856, + 60.2682156618 + ], + [ + 11.31445876122, + 60.2603824128 + ], + [ + 11.328425, + 60.265399 + ], + [ + 11.344468, + 60.265328 + ], + [ + 11.382948, + 60.253896 + ], + [ + 11.415655, + 60.237796 + ], + [ + 11.432291, + 60.221773 + ], + [ + 11.437049, + 60.22409 + ], + [ + 11.421506, + 60.247612 + ], + [ + 11.437835, + 60.261601 + ], + [ + 11.412849, + 60.285637 + ], + [ + 11.417028, + 60.305307 + ], + [ + 11.444868, + 60.325789 + ], + [ + 11.515287, + 60.304312 + ], + [ + 11.601261, + 60.267216 + ], + [ + 11.598781, + 60.244722 + ], + [ + 11.584431, + 60.236376 + ], + [ + 11.58390281439, + 60.20433493011 + ], + [ + 11.58154247046, + 60.20230899341 + ], + [ + 11.58229348898, + 60.20020828485 + ], + [ + 11.5798902297, + 60.20017629332 + ], + [ + 11.5793537879, + 60.19961110456 + ], + [ + 11.57785175085, + 60.19900324918 + ], + [ + 11.57600639105, + 60.19744623492 + ], + [ + 11.57697198629, + 60.19644373459 + ], + [ + 11.560396, + 60.179793 + ], + [ + 11.5646123457, + 60.17349518201 + ], + [ + 11.57135005474, + 60.17688886704 + ], + [ + 11.586852, + 60.169218 + ], + [ + 11.58838, + 60.162737 + ], + [ + 11.554175, + 60.14945 + ], + [ + 11.53037789067, + 60.13740063434 + ] + ] + ] + ] + } + } + ] + } + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/station_information.json b/models/java/gbfs-java-model/src/test/resources/v2_X/station_information.json new file mode 100644 index 00000000..3c2606f0 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/station_information.json @@ -0,0 +1,27 @@ +{ + "last_updated": 1434054678, + "ttl": 0, + "version": "2.2", + "data": { + "stations": [ + { + "station_id": "TST:Station:1", + "name": "Cool bikes", + "lat": 12.34, + "lon": 45.67, + "vehicle_type_capacity": { + "TST:VehicleType:CityBike": 7 + } + }, + { + "station_id": "TST:Station:2", + "name": "Cooler bikes", + "lat": 11.34, + "lon": 44.67, + "vehicle_type_capacity": { + "TST:VehicleType:CityBike": 12 + } + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/station_status.json b/models/java/gbfs-java-model/src/test/resources/v2_X/station_status.json new file mode 100644 index 00000000..e6483de3 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/station_status.json @@ -0,0 +1,54 @@ +{ + "last_updated": 1434054678, + "ttl": 0, + "version": "2.2", + "data": { + "stations": [ + { + "station_id": "TST:Station:1", + "is_installed": true, + "is_renting": true, + "is_returning": true, + "last_reported": 1434054678, + "num_docks_available": 3, + "vehicle_docks_available": [{ + "vehicle_type_ids": ["TST:VehicleType:Scooter"], + "count": 2 + }, { + "vehicle_type_ids": ["TST:VehicleType:CityBike"], + "count": 1 + }], + "num_bikes_available": 1, + "vehicle_types_available": [{ + "vehicle_type_id": "TST:VehicleType:Scooter", + "count": 1 + }, { + "vehicle_type_id": "TST:VehicleType:CityBike", + "count": 0 + }] + }, { + "station_id": "TST:Station:2", + "is_installed": true, + "is_renting": true, + "is_returning": true, + "last_reported": 1434054678, + "num_docks_available": 8, + "vehicle_docks_available": [{ + "vehicle_type_ids": ["TST:VehicleType:Scooter"], + "count": 6 + }, { + "vehicle_type_ids": ["TST:VehicleType:CityBike"], + "count": 2 + }], + "num_bikes_available": 6, + "vehicle_types_available": [{ + "vehicle_type_id": "TST:VehicleType:Scooter", + "count": 2 + }, { + "vehicle_type_id": "TST:VehicleType:CityBike", + "count": 4 + }] + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/system_alerts.json b/models/java/gbfs-java-model/src/test/resources/v2_X/system_alerts.json new file mode 100644 index 00000000..b740efa1 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/system_alerts.json @@ -0,0 +1,23 @@ +{ + "last_updated": 1434054678, + "ttl": 0, + "version": "2.2", + "data": { + "alerts": [ + { + "alert_id": "TST:Alert:1", + "type": "station_closure", + "times": [ + { + "start": 1434054678, + "end": 1434054987 + } + ], + "station_ids": ["TST:Station:1"], + "summary": "Closed for maintenance", + "description": "Station is closed to install more docks.", + "last_updated": 1434054678 + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/system_calendar.json b/models/java/gbfs-java-model/src/test/resources/v2_X/system_calendar.json new file mode 100644 index 00000000..6d6826d6 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/system_calendar.json @@ -0,0 +1,17 @@ +{ + "last_updated": 1434054678, + "ttl": 0, + "version": "2.2", + "data": { + "calendars": [ + { + "start_month": 1, + "start_day": 1, + "start_year": 2020, + "end_month": 12, + "end_day": 30, + "end_year": 2021 + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/system_hours.json b/models/java/gbfs-java-model/src/test/resources/v2_X/system_hours.json new file mode 100644 index 00000000..0bc9d47e --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/system_hours.json @@ -0,0 +1,27 @@ +{ + "last_updated": 1434054678, + "ttl": 0, + "version": "2.2", + "data": { + "rental_hours": [ + { + "user_types": [ "member" ], + "days": ["sat", "sun"], + "start_time": "00:00:00", + "end_time": "23:59:59" + }, + { + "user_types": [ "nonmember" ], + "days": ["sat", "sun"], + "start_time": "05:00:00", + "end_time": "23:59:59" + }, + { + "user_types": [ "member", "nonmember" ], + "days": ["mon", "tue", "wed", "thu", "fri"], + "start_time": "00:00:00", + "end_time": "23:59:59" + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/system_information.json b/models/java/gbfs-java-model/src/test/resources/v2_X/system_information.json new file mode 100644 index 00000000..5545e2b5 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/system_information.json @@ -0,0 +1,22 @@ +{ + "last_updated": 1606830357, + "ttl": 300, + "version": "2.2", + "data": { + "system_id": "TST:System:Test", + "language": "en", + "name": "Test", + "url": "https://www.test.com/", + "timezone": "Europe/Oslo", + "rental_apps": { + "android": { + "store_uri": "https://play.google.com/store/apps/details?id=com.testrental.android", + "discovery_uri": "com.testrental.android://" + }, + "ios": { + "store_uri": "https://apps.apple.com/app/apple-store/id123456789", + "discovery_uri": "com.testrental.ios://" + } + } + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/system_pricing_plans.json b/models/java/gbfs-java-model/src/test/resources/v2_X/system_pricing_plans.json new file mode 100644 index 00000000..55d45e18 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/system_pricing_plans.json @@ -0,0 +1,24 @@ +{ + "last_updated": 1606858558, + "ttl": 300, + "version": "2.2", + "data": { + "plans": [ + { + "plan_id": "TST:PricingPlan:Basic", + "name": "Basic", + "currency": "NOK", + "price": 0.0, + "is_taxable": false, + "description": "Start NOK 0, Per minute 3,50 NOK", + "per_min_pricing": [ + { + "start": 0, + "rate": 3.5, + "interval": 1 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/system_regions.json b/models/java/gbfs-java-model/src/test/resources/v2_X/system_regions.json new file mode 100644 index 00000000..c766f66f --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/system_regions.json @@ -0,0 +1,13 @@ +{ + "last_updated": 1606858379, + "ttl": 300, + "version": "2.2", + "data": { + "regions": [ + { + "region_id": "TST:Region:Sahara", + "name": "Sahara" + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v2_X/vehicle_types.json b/models/java/gbfs-java-model/src/test/resources/v2_X/vehicle_types.json new file mode 100644 index 00000000..cfa608be --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v2_X/vehicle_types.json @@ -0,0 +1,20 @@ +{ + "last_updated": 1606830898, + "ttl": 300, + "version": "2.2", + "data": { + "vehicle_types": [ + { + "vehicle_type_id": "TST:VehicleType:Scooter", + "form_factor": "scooter", + "propulsion_type": "electric", + "max_range_meters": 0.0 + }, + { + "vehicle_type_id": "TST:VehicleType:CityBike", + "form_factor": "bicycle", + "propulsion_type": "human" + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/gbfs.json b/models/java/gbfs-java-model/src/test/resources/v3_0/gbfs.json new file mode 100644 index 00000000..30cf8230 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/gbfs.json @@ -0,0 +1,17 @@ +{ + "last_updated": 1640887163, + "ttl": 0, + "version": "3.0", + "data": { + "feeds": [ + { + "name": "system_information", + "url": "https://www.example.com/gbfs/1/system_information" + }, + { + "name": "station_information", + "url": "https://www.example.com/gbfs/1/station_information" + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/gbfs_versions.json b/models/java/gbfs-java-model/src/test/resources/v3_0/gbfs_versions.json new file mode 100644 index 00000000..e4e93809 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/gbfs_versions.json @@ -0,0 +1,17 @@ +{ + "last_updated": 1640887163, + "ttl": 0, + "version": "3.0", + "data": { + "versions": [ + { + "version": "2.0", + "url": "https://www.example.com/gbfs/2/gbfs" + }, + { + "version": "3.0", + "url": "https://www.example.com/gbfs/3/gbfs" + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/geofencing_zones.json b/models/java/gbfs-java-model/src/test/resources/v3_0/geofencing_zones.json new file mode 100644 index 00000000..97f2ab6d --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/geofencing_zones.json @@ -0,0 +1,98 @@ +{ + "last_updated": 1640887163, + "ttl": 60, + "version": "3.0", + "data": { + "geofencing_zones": { + "type": "FeatureCollection", + "features": [ + { + "type": "Feature", + "geometry": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -122.578067, + 45.562982 + ], + [ + -122.661838, + 45.562741 + ], + [ + -122.661151, + 45.504542 + ], + [ + -122.578926, + 45.5046625 + ], + [ + -122.578067, + 45.562982 + ] + ] + ], + [ + [ + [ + -122.650680, + 45.548197 + ], + [ + -122.650852, + 45.534731 + ], + [ + -122.630939, + 45.535212 + ], + [ + -122.630424, + 45.548197 + ], + [ + -122.650680, + 45.548197 + ] + ] + ] + ] + }, + "properties": { + "name": [ + { + "text": "NE 24th/NE Knott", + "language": "en" + } + ], + "start": 1593878400, + "end": 1593907260, + "rules": [ + { + "vehicle_type_id": [ + "moped1", + "car1" + ], + "ride_start_allowed": false, + "ride_end_allowed": false, + "ride_through_allowed": true, + "maximum_speed_kph": 10, + "station_parking": true + } + ] + } + } + ] + }, + "global_rules": [ + { + "ride_start_allowed": false, + "ride_end_allowed": false, + "ride_through_allowed": true + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/manifest.json b/models/java/gbfs-java-model/src/test/resources/v3_0/manifest.json new file mode 100644 index 00000000..e64295b4 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/manifest.json @@ -0,0 +1,35 @@ +{ + "last_updated":1667004473, + "ttl":0, + "version":"3.0", + "data":{ + "datasets":[ + { + "system_id":"example_berlin", + "versions":[ + { + "version":"2.0", + "url":"https://berlin.example.com/gbfs/2/gbfs" + }, + { + "version":"3.0", + "url":"https://berlin.example.com/gbfs/3/gbfs" + } + ] + }, + { + "system_id":"example_paris", + "versions":[ + { + "version":"2.0", + "url":"https://paris.example.com/gbfs/2/gbfs" + }, + { + "version":"3.0", + "url":"https://paris.example.com/gbfs/3/gbfs" + } + ] + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/station_information.json b/models/java/gbfs-java-model/src/test/resources/v3_0/station_information.json new file mode 100644 index 00000000..f3428eec --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/station_information.json @@ -0,0 +1,89 @@ +{ + "last_updated": 1640887163, + "ttl": 0, + "version": "3.0", + "data": { + "stations": [ + { + "station_id": "pga", + "name": [ + { + "text": "Parking garage A", + "language": "en" + } + ], + "lat": 12.345678, + "lon": 45.678901, + "station_opening_hours": "Su-Th 05:00-22:00; Fr-Sa 05:00-01:00", + "parking_type": "underground_parking", + "parking_hoop": false, + "contact_phone": "+33109874321", + "is_charging_station": true, + "vehicle_type_dock_capacity": [ + { + "vehicle_type_id": "abc123", + "count": 7 + }, + { + "vehicle_type_id": "def456", + "count": 0 + } + ] + }, + { + "station_id": "station12", + "name": [ + { + "text": "SE Belmont & SE 10th", + "language": "en" + } + ], + "lat": 45.516445, + "lon": -122.655775, + "is_valet_station": false, + "is_virtual_station": true, + "is_charging_station": false, + "station_area": { + "type": "MultiPolygon", + "coordinates": [ + [ + [ + [ + -122.655775, + 45.516445 + ], + [ + -122.655705, + 45.516445 + ], + [ + -122.655705, + 45.516495 + ], + [ + -122.655775, + 45.516495 + ], + [ + -122.655775, + 45.516445 + ] + ] + ] + ] + }, + "capacity": 16, + "vehicle_type_area_capacity": [ + { + "vehicle_type_id": "abc123", + "count": 7 + }, + { + "vehicle_type_id": "def456", + "count": 8 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/station_status.json b/models/java/gbfs-java-model/src/test/resources/v3_0/station_status.json new file mode 100644 index 00000000..a65f1e17 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/station_status.json @@ -0,0 +1,71 @@ +{ + "last_updated": 1640887163, + "ttl": 0, + "version": "3.0", + "data": { + "stations": [ + { + "station_id": "station1", + "is_installed": true, + "is_renting": true, + "is_returning": true, + "last_reported": 1609866125, + "num_docks_available": 3, + "num_docks_disabled" : 1, + "vehicle_docks_available": [ + { + "vehicle_type_ids": [ "abc123", "def456" ], + "count": 2 + }, + { + "vehicle_type_ids": [ "def456" ], + "count": 1 + } + ], + "num_vehicles_available": 1, + "num_vehicles_disabled": 2, + "vehicle_types_available": [ + { + "vehicle_type_id": "abc123", + "count": 1 + }, + { + "vehicle_type_id": "def456", + "count": 0 + } + ] + }, + { + "station_id": "station2", + "is_installed": true, + "is_renting": true, + "is_returning": true, + "last_reported": 1609866106, + "num_docks_available": 8, + "num_docks_disabled" : 1, + "vehicle_docks_available": [ + { + "vehicle_type_ids": [ "abc123" ], + "count": 6 + }, + { + "vehicle_type_ids": [ "def456" ], + "count": 2 + } + ], + "num_vehicles_available": 6, + "num_vehicles_disabled": 1, + "vehicle_types_available": [ + { + "vehicle_type_id": "abc123", + "count": 2 + }, + { + "vehicle_type_id": "def456", + "count": 4 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/system_alerts.json b/models/java/gbfs-java-model/src/test/resources/v3_0/system_alerts.json new file mode 100644 index 00000000..9ce617fc --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/system_alerts.json @@ -0,0 +1,43 @@ +{ + "last_updated": 1604519393, + "ttl": 60, + "version": "3.0", + "data": { + "alerts": [ + { + "alert_id": "21", + "type": "station_closure", + "station_ids": [ + "123", + "456", + "789" + ], + "times": [ + { + "start": 1604448000, + "end": 1604674800 + } + ], + "url": [ + { + "text": "https://example.com/more-info", + "language": "en" + } + ], + "summary": [ + { + "text": "Disruption of Service", + "language": "en" + } + ], + "description": [ + { + "text": "The three stations on Broadway will be out of service from 12:00am Nov 3 to 3:00pm Nov 6th to accommodate road work", + "language": "en" + } + ], + "last_updated": 1604198100 + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/system_information.json b/models/java/gbfs-java-model/src/test/resources/v3_0/system_information.json new file mode 100644 index 00000000..5d5e16aa --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/system_information.json @@ -0,0 +1,68 @@ +{ + "last_updated": 1640887163, + "ttl": 1800, + "version": "3.0", + "data": { + "system_id": "example_cityname", + "languages": ["en"], + "name": [ + { + "text": "Example Bike Rental", + "language": "en" + } + ], + "short_name": [ + { + "text": "Example Bike", + "language": "en" + } + ], + "operator": [ + { + "text": "Example Sharing, Inc", + "language": "en" + } + ], + "opening_hours": "Apr 1-Nov 3 00:00-24:00", + "start_date": "2010-06-10", + "url": "https://www.example.com", + "purchase_url": "https://www.example.com", + "phone_number": "+18005551234", + "email": "customerservice@example.com", + "feed_contact_email": "datafeed@example.com", + "timezone": "America/Chicago", + "license_url": "https://www.example.com/data-license.html", + "terms_url": [ + { + "text": "https://www.example.com/en/terms", + "language": "en" + } + ], + "terms_last_updated": "2021-06-21", + "privacy_url": [ + { + "text": "https://www.example.com/en/privacy-policy", + "language": "en" + } + ], + "privacy_last_updated": "2019-01-13", + "rental_apps": { + "android": { + "discovery_uri": "com.example.android://", + "store_uri": "https://play.google.com/store/apps/details?id=com.example.android" + }, + "ios": { + "store_uri": "https://apps.apple.com/app/apple-store/id123456789", + "discovery_uri": "com.example.ios://" + } + }, + "brand_assets": { + "brand_last_modified": "2021-06-15", + "brand_image_url": "https://www.example.com/assets/brand_image.svg", + "brand_image_url_dark": "https://www.example.com/assets/brand_image_dark.svg", + "color": "#C2D32C", + "brand_terms_url": "https://www.example.com/assets/brand.pdf" + } + + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/system_pricing_plans.json b/models/java/gbfs-java-model/src/test/resources/v3_0/system_pricing_plans.json new file mode 100644 index 00000000..17e191bb --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/system_pricing_plans.json @@ -0,0 +1,78 @@ +{ + "last_updated": 1640887163, + "ttl": 0, + "version": "3.0", + "data": { + "plans": [ + { + "plan_id": "plan2", + "name": [ + { + "text": "One-Way", + "language": "en" + } + ], + "currency": "USD", + "price": 2.00, + "reservation_price_per_min": 0.15, + "is_taxable": false, + "description": [ + { + "text": "Includes 10km, overage fees apply after 10km.", + "language": "en" + } + ], + "per_km_pricing": [ + { + "start": 10, + "rate": 1.00, + "interval": 1, + "end": 25 + }, + { + "start": 25, + "rate": 0.50, + "interval": 1 + }, + { + "start": 25, + "rate": 3.00, + "interval": 5 + } + ] + }, + { + "plan_id": "plan3", + "name": [ + { + "text": "Simple Rate", + "language": "en" + } + ], + "currency": "CAD", + "price": 3.00, + "is_taxable": true, + "description": [ + { + "text": "$3 unlock fee, $0.25 per kilometer and 0.50 per minute.", + "language": "en" + } + ], + "per_km_pricing": [ + { + "start": 0, + "rate": 0.25, + "interval": 1 + } + ], + "per_min_pricing": [ + { + "start": 0, + "rate": 0.50, + "interval": 1 + } + ] + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/system_regions.json b/models/java/gbfs-java-model/src/test/resources/v3_0/system_regions.json new file mode 100644 index 00000000..384f294c --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/system_regions.json @@ -0,0 +1,45 @@ +{ + "last_updated": 1640887163, + "ttl": 86400, + "version": "3.0", + "data": { + "regions": [ + { + "name": [ + { + "text": "North", + "language": "en" + } + ], + "region_id": "3" + }, + { + "name": [ + { + "text": "East", + "language": "en" + } + ], + "region_id": "4" + }, + { + "name": [ + { + "text": "South", + "language": "en" + } + ], + "region_id": "5" + }, + { + "name": [ + { + "text": "West", + "language": "en" + } + ], + "region_id": "6" + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/vehicle_status.json b/models/java/gbfs-java-model/src/test/resources/v3_0/vehicle_status.json new file mode 100644 index 00000000..048e8481 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/vehicle_status.json @@ -0,0 +1,63 @@ +{ + "last_updated":1640887163, + "ttl":0, + "version":"3.0", + "data":{ + "vehicles":[ + { + "vehicle_id":"973a5c94-c288-4a2b-afa6-de8aeb6ae2e5", + "last_reported":1609866109, + "lat":12.345678, + "lon":56.789012, + "is_reserved":false, + "is_disabled":false, + "vehicle_type_id":"abc123", + "rental_uris": { + "android": "https://www.example.com/app?vehicle_id=973a5c94-c288-4a2b-afa6-de8aeb6ae2e5&platform=android&", + "ios": "https://www.example.com/app?vehicle_id=973a5c94-c288-4a2b-afa6-de8aeb6ae2e5&platform=ios" + } + }, + { + "vehicle_id":"987fd100-b822-4347-86a4-b3eef8ca8b53", + "last_reported":1609866204, + "is_reserved":false, + "is_disabled":false, + "vehicle_type_id":"def456", + "current_range_meters":6543.0, + "station_id":"86", + "pricing_plan_id":"plan3" + }, + { + "vehicle_id":"45bd3fb7-a2d5-4def-9de1-c645844ba962", + "last_reported":1609866109, + "lat":12.345678, + "lon":56.789012, + "is_reserved":false, + "is_disabled":false, + "vehicle_type_id":"abc123", + "current_range_meters":400000.0, + "available_until":"2021-05-17T15:00:00Z", + "home_station_id":"station1", + "vehicle_equipment":[ + "child_seat_a", + "winter_tires" + ] + }, + { + "vehicle_id":"d4521def-7922-4e46-8e1d-8ac397239bd0", + "last_reported":1609866204, + "is_reserved":false, + "is_disabled":false, + "vehicle_type_id":"def456", + "current_fuel_percent":0.7, + "current_range_meters":6543.0, + "station_id":"86", + "pricing_plan_id":"plan3", + "home_station_id":"146", + "vehicle_equipment":[ + "child_seat_a" + ] + } + ] + } +} \ No newline at end of file diff --git a/models/java/gbfs-java-model/src/test/resources/v3_0/vehicle_types.json b/models/java/gbfs-java-model/src/test/resources/v3_0/vehicle_types.json new file mode 100644 index 00000000..ad6ec792 --- /dev/null +++ b/models/java/gbfs-java-model/src/test/resources/v3_0/vehicle_types.json @@ -0,0 +1,141 @@ +{ + "last_updated": 1640887163, + "ttl": 0, + "version": "3.0", + "data": { + "vehicle_types": [ + { + "vehicle_type_id": "abc123", + "form_factor": "bicycle", + "propulsion_type": "human", + "name": [ + { + "text": "Example Basic Bike", + "language": "en" + } + ], + "wheel_count": 2, + "default_reserve_time": 30, + "return_constraint": "any_station", + "vehicle_assets": { + "icon_url": "https://www.example.com/assets/icon_bicycle.svg", + "icon_url_dark": "https://www.example.com/assets/icon_bicycle_dark.svg", + "icon_last_modified": "2021-06-15" + }, + "default_pricing_plan_id": "bike_plan_1", + "pricing_plan_ids": [ + "bike_plan_1", + "bike_plan_2", + "bike_plan_3" + ] + }, + { + "vehicle_type_id": "cargo123", + "form_factor": "cargo_bicycle", + "propulsion_type": "human", + "name": [ + { + "text": "Example Cargo Bike", + "language": "en" + } + ], + "description": [ + { + "text": "Extra comfortable seat with additional suspension.\n\nPlease be aware of the cargo box lock: you need to press it down before pulling it up again!", + "language": "en" + } + ], + "wheel_count": 3, + "default_reserve_time": 30, + "return_constraint": "roundtrip_station", + "vehicle_assets": { + "icon_url": "https://www.example.com/assets/icon_cargobicycle.svg", + "icon_url_dark": "https://www.example.com/assets/icon_cargobicycle_dark.svg", + "icon_last_modified": "2021-06-15" + }, + "default_pricing_plan_id": "cargo_plan_1", + "pricing_plans_ids": [ + "cargo_plan_1", + "cargo_plan_2", + "cargo_plan_3" + ] + }, + { + "vehicle_type_id": "def456", + "form_factor": "scooter_standing", + "propulsion_type": "electric", + "name": [ + { + "text": "Example E-scooter V2", + "language": "en" + } + ], + "wheel_count": 2, + "max_permitted_speed": 25, + "rated_power": 350, + "default_reserve_time": 30, + "max_range_meters": 12345, + "return_constraint": "free_floating", + "vehicle_assets": { + "icon_url": "https://www.example.com/assets/icon_escooter.svg", + "icon_url_dark": "https://www.example.com/assets/icon_escooter_dark.svg", + "icon_last_modified": "2021-06-15" + }, + "default_pricing_plan_id": "scooter_plan_1" + }, + { + "vehicle_type_id": "car1", + "form_factor": "car", + "rider_capacity": 5, + "cargo_volume_capacity": 200, + "propulsion_type": "combustion_diesel", + "eco_label": [ + { + "country_code": "FR", + "eco_sticker": "critair_1" + }, + { + "country_code": "DE", + "eco_sticker": "euro_2" + } + ], + "name": [ + { + "text": "Four-door Sedan", + "language": "en" + } + ], + "wheel_count": 4, + "default_reserve_time": 0, + "max_range_meters": 523992, + "return_constraint": "roundtrip_station", + "vehicle_accessories": [ + "doors_4", + "automatic", + "cruise_control" + ], + "g_CO2_km": 120, + "vehicle_image": "https://www.example.com/assets/renault-clio.jpg", + "make": [ + { + "text": "Renault", + "language": "en" + } + ], + "model": [ + { + "text": "Clio", + "language": "en" + } + ], + "color": "white", + "vehicle_assets": { + "icon_url": "https://www.example.com/assets/icon_car.svg", + "icon_url_dark": "https://www.example.com/assets/icon_car_dark.svg", + "icon_last_modified": "2021-06-15" + }, + "default_pricing_plan_id": "car_plan_1" + } + ] + } +} \ No newline at end of file