You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This also means that it is impossible to have multiple paths that differ only in query string, such as:
GET /users?firstName=value&lastName=value
GET /users?role=value
This is because Swagger considers a unique operation as a combination of a path and the HTTP method, and additional parameters do not make the operation unique. Instead, you should use unique paths such as:
GET /users/findByName?firstName=value&lastName=value
GET /users/findByRole?role=value
I cannot make sense of this recommendation, as in making me believe it is almost incorrect and should not be there.
Imagine if you extrapolate this suggesiton so you have name, role, occupation, country etc. Having multiple findBy is impossible especially the more combinations you have.
For me, this is completely logical and valid to filter by certain things:
GET /users?firstName=value&lastName=value
GET /users?role=value
It means I can add/remove firstName, role, occupation, country etc. as I see fit to only limit results that match all of my filters.
The text was updated successfully, but these errors were encountered:
https://swagger.io/docs/specification/paths-and-operations/ under "Query String in Paths" mentions:
I cannot make sense of this recommendation, as in making me believe it is almost incorrect and should not be there.
Imagine if you extrapolate this suggesiton so you have name, role, occupation, country etc. Having multiple
findBy
is impossible especially the more combinations you have.For me, this is completely logical and valid to filter by certain things:
It means I can add/remove firstName, role, occupation, country etc. as I see fit to only limit results that match all of my filters.
The text was updated successfully, but these errors were encountered: