traewelling
traewelling copied to clipboard
API: IBNR key naming inconsistent across models
Unlike all other models, the IBNR in the 'stopover' model is not marked as 'IBNR' but as 'evaIdentifier'.
Which name would you prefer?
In the context of #2411, the model of the stations could be modified anyway so that an array with external IDs is added there. This would also make migration easier for API consumers.
{
"station": {
"id": 6882,
"name": "Karlsruhe-Durlach",
"coordinates": {
"latitude": 49.002025,
"longitude": 8.462292,
}
"identifier": {
"eva": 8003184,
"ril100": "RKDU",
"ifopt": "de:08212:801"
}
},
}
I think that's the right way to handle it.
We should include a prefix for the keys eva and ril100, because the name itself is not necessarily unique. E.g. db:ibnr
, oebb:ibnr
and such. (Just for future proofing these IDs)