openmobilityfoundation / mobility-data-specification

A data standard to enable right-of-way regulation and two-way communication between mobility companies and local governments.
https://www.openmobilityfoundation.org/about-mds/
Other
687 stars 232 forks source link

Turn `vehicle_type` into an enumeration #16

Closed hunterowens closed 6 years ago

hunterowens commented 6 years ago
hunterowens commented 6 years ago

@toddapetersen thoughts?

toddapetersen commented 6 years ago

Hi Hunter. I agree with the thinking. We may want to consider breaking it down further to more easily accommodate future designs. Here is what I think the model might look like:

{ "$schema": "http://json-schema.org/draft-04/schema#", "title" : "New Vehicle Schema", "type": "object", "properties": { "type": { "$ref": "#/models/Vehicle" }, "propulsion": { "$ref": "#/models/Propulsion" } } } "Vehicle": {
"title" : "Vehicle Schema", "type" : "string", "enum": [ "bike", "scooter", "recumbent"] } "Propulsion": { "title" : "Propulsion Schema", "type":"string", "enum":[ "human", "electric", "combustion"] }

toddapetersen commented 6 years ago

Changed committed.