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.
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.