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
676 stars 232 forks source link

Add the possibility to update vehicle_type in /vehicles update #765

Open S-eb opened 2 years ago

S-eb commented 2 years ago

Is your feature request related to a problem? Please describe.

Vehicle_types are more fluid than it seems and it happens frequently that during a mobility program launch, vehicles initially registered with a given vehicle_type have to be updated.

Describe the solution you'd like

Give possibility to change the vehicle_type in the /vehicles endpoint

Endpoint: /vehicles/{device_id} Method: PUT

Body Params:

Field Type Required/Optional Field Description
vehicle_id String Required Vehicle Identification Number (vehicle_id) visible on vehicle
vehicle_type Enum Required Vehicle Types

Is this a breaking change

Impacted Spec

For which spec is this feature being requested?

Describe alternatives you've considered

No real alternative at this point.

schnuerle commented 2 years ago

Interesting. @avatarneil @marie-x do you think a new endpoint here is the solution to this, or is there some other way?

Certainly this could be part of our Unification work for 2.0.

schnuerle commented 1 month ago

@pierre-bouffort do you think this is still needed. Can be added to the Agency push options.

pierre-bouffort commented 1 month ago

It could definitely still be useful. Our only workaround today is to re-register the vehicle with a complete new UUID, which completely decorrelates the vehicle histories before/after the vehicle type change. So it could be a useful addition.

With that being said, I don't think it is necessarily a top-priority. So if the issue is too complicated to tackle now, we can keep working around it for some time.