traewelling icon indicating copy to clipboard operation
traewelling copied to clipboard

API: IBNR key naming inconsistent across models

Open marhei opened this issue 11 months ago • 3 comments

Unlike all other models, the IBNR in the 'stopover' model is not marked as 'IBNR' but as 'evaIdentifier'.

marhei avatar Mar 11 '24 13:03 marhei

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"
      }
  },
}

MrKrisKrisu avatar Mar 11 '24 19:03 MrKrisKrisu

I think that's the right way to handle it.

marhei avatar Mar 11 '24 20:03 marhei

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)

HerrLevin avatar Mar 25 '24 17:03 HerrLevin