Skip to content

Commit

Permalink
Fix conditionally required fields (#61)
Browse files Browse the repository at this point in the history
* fix conditionally required fields

* fix vehicle_types

* fix typo
  • Loading branch information
isabelle-dr authored Nov 25, 2021
1 parent 60305d2 commit 4b1f5a4
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 68 deletions.
8 changes: 2 additions & 6 deletions v1.1/system_information.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@
"format": "uri"
}
},
"dependencies": {
"android": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
},
"ios": {
"description":
Expand All @@ -138,9 +136,7 @@
"format": "uri"
}
},
"dependencies": {
"ios": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
}
}
}
Expand Down
8 changes: 2 additions & 6 deletions v2.0/system_information.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@
"format": "uri"
}
},
"dependencies": {
"android": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
},
"ios": {
"description":
Expand All @@ -138,9 +136,7 @@
"format": "uri"
}
},
"dependencies": {
"ios": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions v2.1/station_status.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"type": "integer",
"minimum": 0
}
}
},
"required": ["vehicle_type_id", "count"]
}
},
"num_bikes_disabled": {
Expand Down Expand Up @@ -121,10 +122,8 @@
"type": "integer",
"minimum": 0
}
}
},
"dependencies": {
"vehicle_docks_available": ["vehicle_type_ids", "count"]
},
"required": ["vehicle_type_ids", "count"]
}
}
},
Expand Down
8 changes: 2 additions & 6 deletions v2.1/system_information.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@
"format": "uri"
}
},
"dependencies": {
"android": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
},
"ios": {
"description":
Expand All @@ -138,9 +136,7 @@
"format": "uri"
}
},
"dependencies": {
"ios": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
}
}
}
Expand Down
9 changes: 4 additions & 5 deletions v2.2/station_status.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"type": "integer",
"minimum": 0
}
}
},
"required": ["vehicle_type_id", "count"]
}
},
"num_bikes_disabled": {
Expand Down Expand Up @@ -121,10 +122,8 @@
"type": "integer",
"minimum": 0
}
}
},
"dependencies": {
"vehicle_docks_available": ["vehicle_type_ids", "count"]
},
"required": ["vehicle_type_ids", "count"]
}
}
},
Expand Down
8 changes: 2 additions & 6 deletions v2.2/system_information.json
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@
"format": "uri"
}
},
"dependencies": {
"android": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
},
"ios": {
"description":
Expand All @@ -138,9 +136,7 @@
"format": "uri"
}
},
"dependencies": {
"ios": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
}
}
}
Expand Down
12 changes: 4 additions & 8 deletions v2.2/system_pricing_plans.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@
"type": "integer",
"minimum": 0
}
}
},
"dependencies": {
"per_km_pricing": ["start", "rate", "interval"]
},
"required": ["start", "rate", "interval"]
}
},
"per_min_pricing": {
Expand Down Expand Up @@ -134,10 +132,8 @@
"type": "integer",
"minimum": 0
}
}
},
"dependencies": {
"per_min_pricing": ["start", "rate", "interval"]
},
"required": ["start", "rate", "interval"]
}
},
"surge_pricing": {
Expand Down
9 changes: 4 additions & 5 deletions v2.3-RC/station_status.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@
"type": "integer",
"minimum": 0
}
}
},
"required": ["vehicle_type_id", "count"],
}
},
"num_bikes_disabled": {
Expand Down Expand Up @@ -121,10 +122,8 @@
"type": "integer",
"minimum": 0
}
}
},
"dependencies": {
"vehicle_docks_available": ["vehicle_type_ids", "count"]
},
"required": ["vehicle_type_ids", "count"]
}
}
},
Expand Down
14 changes: 4 additions & 10 deletions v2.3-RC/system_information.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,7 @@
"pattern": "^#([a-fA-F0-9]{6})$"
}
},
"dependencies":{
"brand_assets": ["brand_last_modified", "brand_image_url"]
}
"required": ["brand_last_modified", "brand_image_url"]
},
"terms_url": {
"description":
Expand Down Expand Up @@ -175,9 +173,7 @@
"format": "uri"
}
},
"dependencies": {
"android": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
},
"ios": {
"description":
Expand All @@ -197,15 +193,13 @@
"format": "uri"
}
},
"dependencies": {
"ios": ["store_uri", "discovery_uri"]
}
"required": ["store_uri", "discovery_uri"]
}
}
}
},
"required": ["system_id", "language", "name", "timezone"],
"dependencies": {
"dependentRequired": {
"terms_url": ["terms_last_updated"],
"privacy_url": ["privacy_last_updated"]
}
Expand Down
12 changes: 4 additions & 8 deletions v2.3-RC/system_pricing_plans.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,8 @@
"type": "integer",
"minimum": 0
}
}
},
"dependencies": {
"per_km_pricing": ["start", "rate", "interval"]
},
"required": ["start", "rate", "interval"]
}
},
"per_min_pricing": {
Expand Down Expand Up @@ -134,10 +132,8 @@
"type": "integer",
"minimum": 0
}
}
},
"dependencies": {
"per_min_pricing": ["start", "rate", "interval"]
},
"required": ["start", "rate", "interval"]
}
},
"surge_pricing": {
Expand Down
4 changes: 1 addition & 3 deletions v2.3-RC/vehicle_types.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,7 @@
}
}
},
"dependencies": {
"vehicle_assets": ["icon_url", "icon_last_modified"]
}
"required": ["icon_url", "icon_last_modified"]
}
},
"required": ["vehicle_type_id", "form_factor", "propulsion_type"],
Expand Down

0 comments on commit 4b1f5a4

Please sign in to comment.