|
31 | 31 | "type": "object",
|
32 | 32 | "properties": {
|
33 | 33 | "geofencing_zones": {
|
34 |
| - "type": "array", |
35 |
| - "items": { |
36 |
| - "type": "object", |
37 |
| - "properties": { |
38 |
| - "type": { |
39 |
| - "description": "FeatureCollection as per IETF RFC 7946.", |
40 |
| - "type": "string", |
41 |
| - "enum": [ |
42 |
| - "FeatureCollection" |
43 |
| - ] |
44 |
| - }, |
45 |
| - "features": { |
46 |
| - "description": "Array of objects.", |
47 |
| - "type": "array", |
48 |
| - "items": { |
49 |
| - "title": "GeoJSON Feature", |
50 |
| - "type": "object", |
| 34 | + "type": "object", |
| 35 | + "description": "Each geofenced zone and its associated rules and attributes is described as an object within the array of features.", |
| 36 | + "properties": { |
| 37 | + "type": { |
| 38 | + "description": "FeatureCollection as per IETF RFC 7946.", |
| 39 | + "type": "string", |
| 40 | + "enum": [ |
| 41 | + "FeatureCollection" |
| 42 | + ] |
| 43 | + }, |
| 44 | + "features": { |
| 45 | + "description": "Array of objects.", |
| 46 | + "type": "array", |
| 47 | + "items": { |
| 48 | + "title": "GeoJSON Feature", |
| 49 | + "type": "object", |
| 50 | + "properties": { |
| 51 | + "type": { |
| 52 | + "type": "string", |
| 53 | + "enum": [ |
| 54 | + "Feature" |
| 55 | + ] |
| 56 | + }, |
51 | 57 | "properties": {
|
52 |
| - "type": { |
53 |
| - "type": "string", |
54 |
| - "enum": [ |
55 |
| - "Feature" |
56 |
| - ] |
57 |
| - }, |
| 58 | + "description": "Describing travel allowances and limitations.", |
| 59 | + "type": "object", |
58 | 60 | "properties": {
|
59 |
| - "description": "Describing travel allowances and limitations.", |
60 |
| - "type": "object", |
61 |
| - "properties": { |
62 |
| - "name": { |
63 |
| - "description": "Public name of the geofencing zone.", |
64 |
| - "type": "string" |
65 |
| - }, |
66 |
| - "start": { |
67 |
| - "description": "Start time of the geofencing zone in POSIX time.", |
68 |
| - "type": "number", |
69 |
| - "minimum": 1450155600 |
70 |
| - }, |
71 |
| - "end": { |
72 |
| - "description": "End time of the geofencing zone in POSIX time.", |
73 |
| - "type": "number", |
74 |
| - "minimum": 1450155600 |
75 |
| - }, |
76 |
| - "rules": { |
77 |
| - "description": "Array that contains one object per rule.", |
78 |
| - "type": "array", |
79 |
| - "items": { |
80 |
| - "type":"object", |
81 |
| - "properties": { |
82 |
| - "vehicle_type_id": { |
83 |
| - "type": "array", |
84 |
| - "description": "Array of vehicle type IDs for which these restrictions apply.", |
85 |
| - "items": {"type": "string"} |
86 |
| - }, |
87 |
| - "ride_allowed": { |
88 |
| - "description": "Is the undocked ride allowed to stat and end in this zone?", |
89 |
| - "type": "boolean" |
90 |
| - }, |
91 |
| - "ride_through_allowed": { |
92 |
| - "description": "Is the ride allowed to travel through this zone?", |
93 |
| - "type": "boolean" |
94 |
| - }, |
95 |
| - "maximum_speed_kph": { |
96 |
| - "description": "What is the maximum speed allowed, in kilometers per hour?", |
97 |
| - "type": "number", |
98 |
| - "minimum": 0 |
99 |
| - } |
| 61 | + "name": { |
| 62 | + "description": "Public name of the geofencing zone.", |
| 63 | + "type": "string" |
| 64 | + }, |
| 65 | + "start": { |
| 66 | + "description": "Start time of the geofencing zone in POSIX time.", |
| 67 | + "type": "number", |
| 68 | + "minimum": 1450155600 |
| 69 | + }, |
| 70 | + "end": { |
| 71 | + "description": "End time of the geofencing zone in POSIX time.", |
| 72 | + "type": "number", |
| 73 | + "minimum": 1450155600 |
| 74 | + }, |
| 75 | + "rules": { |
| 76 | + "description": "Array that contains one object per rule.", |
| 77 | + "type": "array", |
| 78 | + "items": { |
| 79 | + "type":"object", |
| 80 | + "properties": { |
| 81 | + "vehicle_type_id": { |
| 82 | + "type": "array", |
| 83 | + "description": "Array of vehicle type IDs for which these restrictions apply.", |
| 84 | + "items": {"type": "string"} |
100 | 85 | },
|
101 |
| - "required": [ |
102 |
| - "ride_allowed", |
103 |
| - "ride_through_allowed" |
104 |
| - ] |
105 |
| - } |
| 86 | + "ride_allowed": { |
| 87 | + "description": "Is the undocked ride allowed to stat and end in this zone?", |
| 88 | + "type": "boolean" |
| 89 | + }, |
| 90 | + "ride_through_allowed": { |
| 91 | + "description": "Is the ride allowed to travel through this zone?", |
| 92 | + "type": "boolean" |
| 93 | + }, |
| 94 | + "maximum_speed_kph": { |
| 95 | + "description": "What is the maximum speed allowed, in kilometers per hour?", |
| 96 | + "type": "number", |
| 97 | + "minimum": 0 |
| 98 | + } |
| 99 | + }, |
| 100 | + "required": [ |
| 101 | + "ride_allowed", |
| 102 | + "ride_through_allowed" |
| 103 | + ] |
106 | 104 | }
|
107 | 105 | }
|
108 |
| - }, |
109 |
| - "geometry": { |
110 |
| - "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.", |
111 |
| - "title": "GeoJSON MultiPolygon", |
112 |
| - "type": "object", |
113 |
| - "properties": { |
114 |
| - "type": { |
115 |
| - "type": "string", |
116 |
| - "enum": [ |
117 |
| - "MultiPolygon" |
118 |
| - ] |
119 |
| - }, |
120 |
| - "coordinates": { |
| 106 | + } |
| 107 | + }, |
| 108 | + "geometry": { |
| 109 | + "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.", |
| 110 | + "title": "GeoJSON MultiPolygon", |
| 111 | + "type": "object", |
| 112 | + "properties": { |
| 113 | + "type": { |
| 114 | + "type": "string", |
| 115 | + "enum": [ |
| 116 | + "MultiPolygon" |
| 117 | + ] |
| 118 | + }, |
| 119 | + "coordinates": { |
| 120 | + "type": "array", |
| 121 | + "items": { |
121 | 122 | "type": "array",
|
122 | 123 | "items": {
|
123 | 124 | "type": "array",
|
| 125 | + "minItems": 4, |
124 | 126 | "items": {
|
125 | 127 | "type": "array",
|
126 |
| - "minItems": 4, |
| 128 | + "minItems": 2, |
127 | 129 | "items": {
|
128 |
| - "type": "array", |
129 |
| - "minItems": 2, |
130 |
| - "items": { |
131 |
| - "type": "number" |
132 |
| - } |
| 130 | + "type": "number" |
133 | 131 | }
|
134 | 132 | }
|
135 | 133 | }
|
136 | 134 | }
|
137 |
| - }, |
138 |
| - "required": [ |
139 |
| - "type", |
140 |
| - "coordinates" |
141 |
| - ] |
142 |
| - } |
143 |
| - }, |
144 |
| - "required": [ |
145 |
| - "type", |
146 |
| - "geometry", |
147 |
| - "properties" |
148 |
| - ] |
149 |
| - } |
| 135 | + } |
| 136 | + }, |
| 137 | + "required": [ |
| 138 | + "type", |
| 139 | + "coordinates" |
| 140 | + ] |
| 141 | + } |
| 142 | + }, |
| 143 | + "required": [ |
| 144 | + "type", |
| 145 | + "geometry", |
| 146 | + "properties" |
| 147 | + ] |
150 | 148 | }
|
151 |
| - }, |
152 |
| - "required": [ |
153 |
| - "type", |
154 |
| - "features" |
155 |
| - ] |
156 |
| - } |
| 149 | + } |
| 150 | + }, |
| 151 | + "required": [ |
| 152 | + "type", |
| 153 | + "features" |
| 154 | + ] |
157 | 155 | }
|
158 | 156 | }
|
159 | 157 | }
|
|
0 commit comments