openmobilityfoundation / openmobilityfoundation/mobility-data-specification

Data structure with sub-objects for mode-specific attributes complexifies the data ingestion

Open
#888 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Data Types discussion Passenger Schema
Dominant language
No language data
Stars
746
Forks
252
Avg merge
3d 16h
Merged PRs (30d)
2

Description

As of today, objetcs such as trips and vehicles 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.

image (9)

PS: this would be made possible only if the mode is written in the object, see Issue #887

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing Issue #887, since this proposal depends on mode being present in each object. Compare the current trips and vehicles structures, including trip_attributes and vehicle_attributes, with the proposed mode-specific objects. Done would be an agreed schema direction that clearly documents the resulting fields and conditional requirements.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.