Data structure with sub-objects for mode-specific attributes complexifies the data ingestion #888
Labels
Data Types
Changes to the base data_types.md file
discussion
Feedback is requested on an ongoing basis
Passenger Services
Passenger Services mode: taxis, TNC, TNP, PTC, paratransit, etc.
Schema
Implications for JSON Schema or OpenAPI
As of today, objetcs such as
trips
andvehicles
have in their fields some attribute tables that depend on the mode they relate to. We find this structure to be sort of sub-optimal. Indeed, as explained in the scheme below, we believe an alternate option could be to define the fields in the objects themselves (trips
,vehicles
, ...) as conditional to the mode.In practice, this would mean to include the fields in these mode-specific attribute tables (like
trip_attributes
,vehicle_attributes
, ...) directly into the root objects (trip
,vehicle
, ...) and defining their required/conditional status based on the mode itself.=> Instead of having objects with mode-specific fields, you end up having mode-specific objects.
PS: this would be made possible only if the mode is written in the object, see Issue #887
The text was updated successfully, but these errors were encountered: