TOMP-WG / TOMP-API

Transport Operator to Mobility-as-a-Service Provider-API development for Mobility as a Service
Apache License 2.0
100 stars 41 forks source link

[BUG] no discriminator in details of FARE object #521

Open edwinvandenbelt opened 11 months ago

edwinvandenbelt commented 11 months ago

API Version

1.5 and before

Summary

The fare object contains a 'details' object. This can be a 'fare' object or an 'extra costs' object, but technically it cannot be determined correctly which one (no discriminator field).

Expected Behavior

Both objects (fare and extra costs) should have a single field to tell if it is a fare or an extra-costs object.

Current Behavior

parsing is not doable without additional code.

Possible Solution

add in the 'extra costs' an additional field: class. It should contain extraCosts per default and in the fare object, it should contain "fare". The 'details' field should have a discriminator field 'class'.

Context (Environment)

When retrieving an overview of what has to be paid, the details cannot be interpreted easily.

edwinvandenbelt commented 9 months ago

Went obsolete at the moment we merged journal-entry and fare.