-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use UUID format for query params with _id suffix #207
Comments
This seems reasonable.. my only reservation is whether there is a case where something might be called an ID, but it's not a UUID? |
Thinking about this some more:
Some values that are UUIDs might not be identifiers for anything. A UUID could be used for a nonce, for example.
I'm not sure that all IDs are always going to be UUIDs. We might have an _id that is truly an identifier, but it cannot be a UUID because it references an entity in an external system or process, and that system or process does not use UUIDs. Issues might not use UUIDs for public identifiers, from past discussions. The counter-examples I point out are probably not in the majority of cases, but we can't be a source of friction in API development either. I would be OK with this as long as it is very easy for us to add exceptions on a case-by-case basis -- kind of like how we do with the tenancy. Could we make those exceptions even clearer and more readable? |
This is the sort of thing we'd like to warn about, or allow nuance to easily develop here. Maybe the upcoming DSL will make us more confident to introduce this rule, if it is easy to refine it later. |
I think we need a linter to ensure query params with ids:
_id
suffix_id
suffix for UUID formatted query paramseg:
/example?foo_id=f5d14962-7b36-44e9-972d-9a764a9c2a3f
The text was updated successfully, but these errors were encountered: