From a53af4a4bc6d3f5f12182e3c5d86bc66eaa94c8b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=20Erik=20St=C3=B8wer?= Date: Mon, 19 Apr 2021 22:18:13 +0200 Subject: [PATCH] Fix geofencing_zones ref https://github.com/NABSA/gbfs/issues/308 and https://github.com/NABSA/gbfs/commit/c89f7baf6aa85eca6c14812f34a5094f47cc7315 (#44) --- geofencing_zones.json | 212 +++++++++++++++++++++--------------------- 1 file changed, 105 insertions(+), 107 deletions(-) diff --git a/geofencing_zones.json b/geofencing_zones.json index fd69b3e5..a0e7cf4d 100644 --- a/geofencing_zones.json +++ b/geofencing_zones.json @@ -31,129 +31,127 @@ "type": "object", "properties": { "geofencing_zones": { - "type": "array", - "items": { - "type": "object", - "properties": { - "type": { - "description": "FeatureCollection as per IETF RFC 7946.", - "type": "string", - "enum": [ - "FeatureCollection" - ] - }, - "features": { - "description": "Array of objects.", - "type": "array", - "items": { - "title": "GeoJSON Feature", - "type": "object", + "type": "object", + "description": "Each geofenced zone and its associated rules and attributes is described as an object within the array of features.", + "properties": { + "type": { + "description": "FeatureCollection as per IETF RFC 7946.", + "type": "string", + "enum": [ + "FeatureCollection" + ] + }, + "features": { + "description": "Array of objects.", + "type": "array", + "items": { + "title": "GeoJSON Feature", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "Feature" + ] + }, "properties": { - "type": { - "type": "string", - "enum": [ - "Feature" - ] - }, + "description": "Describing travel allowances and limitations.", + "type": "object", "properties": { - "description": "Describing travel allowances and limitations.", - "type": "object", - "properties": { - "name": { - "description": "Public name of the geofencing zone.", - "type": "string" - }, - "start": { - "description": "Start time of the geofencing zone in POSIX time.", - "type": "number", - "minimum": 1450155600 - }, - "end": { - "description": "End time of the geofencing zone in POSIX time.", - "type": "number", - "minimum": 1450155600 - }, - "rules": { - "description": "Array that contains one object per rule.", - "type": "array", - "items": { - "type":"object", - "properties": { - "vehicle_type_id": { - "type": "array", - "description": "Array of vehicle type IDs for which these restrictions apply.", - "items": {"type": "string"} - }, - "ride_allowed": { - "description": "Is the undocked ride allowed to stat and end in this zone?", - "type": "boolean" - }, - "ride_through_allowed": { - "description": "Is the ride allowed to travel through this zone?", - "type": "boolean" - }, - "maximum_speed_kph": { - "description": "What is the maximum speed allowed, in kilometers per hour?", - "type": "number", - "minimum": 0 - } + "name": { + "description": "Public name of the geofencing zone.", + "type": "string" + }, + "start": { + "description": "Start time of the geofencing zone in POSIX time.", + "type": "number", + "minimum": 1450155600 + }, + "end": { + "description": "End time of the geofencing zone in POSIX time.", + "type": "number", + "minimum": 1450155600 + }, + "rules": { + "description": "Array that contains one object per rule.", + "type": "array", + "items": { + "type":"object", + "properties": { + "vehicle_type_id": { + "type": "array", + "description": "Array of vehicle type IDs for which these restrictions apply.", + "items": {"type": "string"} }, - "required": [ - "ride_allowed", - "ride_through_allowed" - ] - } + "ride_allowed": { + "description": "Is the undocked ride allowed to stat and end in this zone?", + "type": "boolean" + }, + "ride_through_allowed": { + "description": "Is the ride allowed to travel through this zone?", + "type": "boolean" + }, + "maximum_speed_kph": { + "description": "What is the maximum speed allowed, in kilometers per hour?", + "type": "number", + "minimum": 0 + } + }, + "required": [ + "ride_allowed", + "ride_through_allowed" + ] } } - }, - "geometry": { - "description": "A polygon that describes where rides might not be able to start, end, go through, or have otehr limitations. Must follow the right-hand rule.", - "title": "GeoJSON MultiPolygon", - "type": "object", - "properties": { - "type": { - "type": "string", - "enum": [ - "MultiPolygon" - ] - }, - "coordinates": { + } + }, + "geometry": { + "description": "A polygon that describes where rides might not be able to start, end, go through, or have otehr limitations. Must follow the right-hand rule.", + "title": "GeoJSON MultiPolygon", + "type": "object", + "properties": { + "type": { + "type": "string", + "enum": [ + "MultiPolygon" + ] + }, + "coordinates": { + "type": "array", + "items": { "type": "array", "items": { "type": "array", + "minItems": 4, "items": { "type": "array", - "minItems": 4, + "minItems": 2, "items": { - "type": "array", - "minItems": 2, - "items": { - "type": "number" - } + "type": "number" } } } } - }, - "required": [ - "type", - "coordinates" - ] - } - }, - "required": [ - "type", - "geometry", - "properties" - ] - } + } + }, + "required": [ + "type", + "coordinates" + ] + } + }, + "required": [ + "type", + "geometry", + "properties" + ] } - }, - "required": [ - "type", - "features" - ] - } + } + }, + "required": [ + "type", + "features" + ] } } }