-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Recognize_path should account for HTTP method #2415
Comments
Indeed. I am actually kinda surprised it doesn't. Start by writing a spec that (fails to) differentiate(s) multiple methods on the same API. What do we return today? The first matching route? In which case I think we should consider making this |
… same route and different methods
Hey 👋 I was taking a look to this issue. As @ideaoforder described, when using the Check with this spec that when obtaining the routes for the We need to define which behaviour we want for the Option a
Internally, when In this option, the Option b
In this option, the This is the option that is added to jcagarcia@919f5f3 as a failed spec. For this Option b is pending to check how to include all the routes inside the array could affect the detection of the routes in Grape. |
What do you think @dblock ? |
Option b) is a breaking change whereas option a) is not but doesn't behave the way we want. I think a cleaner option would be c) add a new method called, for example, |
In a RESTful API, you'll use the same path multiple times, but with a different REST verb.
These will return the same endpoint:
GET /orders
POST /orders
So will these:
GET /orders/123
PUT /orders/123
DELETE /orders/123
Ideally, we'd be able to pass that in as an option:
The text was updated successfully, but these errors were encountered: