opentripmodel / otm5-change-requests

Tracking and reporting bugs and change requests of the OTM5 specification.
5 stars 1 forks source link

Server side ID generation and add nonce instead #16

Closed thomaskolmans closed 3 years ago

thomaskolmans commented 3 years ago

Type of request

Is your feature request related to a problem? ID provided through given parameter. It makes it non-uniform and potentially gives a conflict in the future when someone for (whatever) reason inserts a non-unique ID.

Describe the solution you'd like Purely generated IDs server side, allow for a nonce for backwards identification. This value is not saved in the database and is purely for back-reference what entity is being sent back with the generated ID.

Describe alternatives you've considered Keep it this way and display an error message - that is what we do now.

bmeesters commented 3 years ago

So your request is about not providing an ID in the request but generating it on the server? In other words, basically you want the UUIDs to be optional and generated instead so it can be returned in the response?

bmeesters commented 3 years ago

@thomaskolmans, if I understand you correctly you want the ability for clients to omit the UUID and let the server generate those right? In any case, I would be in favor of that change. But I might misunderstand you.

thomaskolmans commented 3 years ago

Yes, I want that it's prohibited to supply a UUID. In my opinion identifiers values should never be supplied outside of the API.

bmeesters commented 3 years ago

We cannot prohibit it without jumping to OTM 6, so we cannot do that any time soon. Also IMO if a trip is shared among multiple systems it should have the same UUID, so I don't think we want to prohibit it everywhere.

However we can make it optional, so the client is allowed to let the server take care of it. In principle OTM servers are allowed to create their own logic, so you can then reject any OTM that does provide UUIDs if you really want.

thomaskolmans commented 3 years ago

Makes sense, that works!

bmeesters commented 3 years ago

This is now part of OTM5.2