-
Notifications
You must be signed in to change notification settings - Fork 46
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
confusion around endpoint naming #97
Comments
I would not expect routes with singular resource names.... I would expect: In collection style:
In controller style:
|
@OR13 also ok with this approach in general and like it quite a bit - down side there is that overloading is not super well supported in openapi 3.0 from a clarity standpoint and it can lead to confusion in certain scenarios with sets of parameters to the api in that case, taking an array/list by default to the post has worked well for us in the past, caveat being that you may only be posting one item in that array. edit to add: |
given the pain of endpoint overloading, I would suggest we simply make new route names and avoid endpoint overloading. |
Signed-off-by: Sam Hellawell <sshellawell@gmail.com>
Discussed on 2022-01-18 telecon: The group decided that forcing the URL endpoints to be at the root of a domain was an anti-pattern. The group seems to have decided on a .../noun/verb pattern, but @mprorock is concerned that this might not have been the right direction to go in. We will continue discussion in this issue. |
We should likely revisit the updated best practices and design guide to make sure we are in line here for the long term |
This seems related to #271. |
suggest closing. |
resolved in PR #271 |
In reviewing and working with a few things off the api, our team noticed that the current spec is inconsistent with RESTful specs and APIs that we have encountered in the past. See the REST api guide for the baseline styles for naming that we are used to encountering.
a concrete example; with an endpoint like
/credentials/issue
the plural indicates to a developer that the noun
credential
would be issued (verb:issue
) in multiple due to the plural use of the word "credentials". the behavior however, is to issue a single credential (which is indicated in the tag, but not the RESTful path).What i would have expected would be for the path to the method to be
/credential/issue
to issue a single credential, then in cases where multiple credentials were to be issued, to use the path/credentials/issue
as it is written now.quoting out from the docs linked above with a little commentary
any insight into why this is the case?
The text was updated successfully, but these errors were encountered: