Recognize_path should account for HTTP method
Open
Nobody has claimed this yet.
feature request
- Dominant language
- Ruby
- Stars
- 10k
- Forks
- 1.2k
- Avg merge
- 14h 38m
- Merged PRs (30d)
- 92
Description
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 /ordersPOST /orders
So will these:
GET /orders/123PUT /orders/123DELETE /orders/123
Ideally, we'd be able to pass that in as an option:
API.recognize_path('/orders/123', method: 'PUT')
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the API.recognize_path entry point and inspect how path recognition currently handles the supplied options. Confirm the expected behavior for GET, POST, PUT, and DELETE requests on the example paths; done means passing a method option distinguishes routes that share a path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100