openmobilityfoundation / mds-openapi

OpenAPI description for MDS data feeds, managed by the Open Mobility Foundation.
https://openmobilityfnd.stoplight.io/docs/mds-openapi
Other
8 stars 2 forks source link

Conflict in documentation regarding Trip - trip_type #43

Open fractalf opened 8 months ago

fractalf commented 8 months ago

So is trip_type one string or many strings in array ?

https://github.com/openmobilityfoundation/mobility-data-specification/blob/2.0.0/data-types.md#trips image

https://github.com/openmobilityfoundation/mobility-data-specification/blob/2.0.0/modes/micromobility.md#trip-type image

https://openmobilityfnd.stoplight.io/docs/mds-openapi/0f4cefcc4c183-trips image

schnuerle commented 7 months ago

Looks like the Stoplight docs are in error. Should be one trip type. A PR can be created here https://github.com/openmobilityfoundation/mds-openapi

schnuerle commented 4 months ago

I'm not sure exactly how to change this trip_type array to an enumerated value based on mode in OpenAPI.

Maybe @mplsmitch @thekaveman could help advise.

Also might need to edit in passenger services, car share, delivery robots, and micromobility pages.

I have a fix-trip-type branch started for this work here.

thekaveman commented 4 months ago

The schema does allow only a single trip_type (via the minItems: 1 and maxItems: 1 qualifiers), however it seems like an error since this type should be a string and not an array.

I think the changes would be:

trip.trip_type:

trip_type:
  type: string

Then for each of the mode-specific trip definitions, raising the enum property out of the items key, e.g. for passenger-services.trip:

trip_type:
  enum:
    - private
    - shared
    - reservation
    - empty