Unexpected ordering between prefix and mount point
Open
Nobody has claimed this yet.
discuss!
- Dominant language
- Ruby
- Stars
- 10k
- Forks
- 1.2k
- Avg merge
- 14h 38m
- Merged PRs (30d)
- 92
Description
class API < Grape::API
prefix 'api'
format :json
mount Acme::Ping => 'foo'
mount Acme::Raise
mount Acme::Protected
mount Acme::Post
end
This generates a url like /foo/api. I'd expect the prefix to take precedence over the mount point and give me /api/foo. If this is intentional, please disregard.
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 by running the provided Ruby Grape example and tracing how the prefix and mount paths are combined. Determine whether the ordering is intentional; if not, the route should resolve to /api/foo rather than /foo/api, with coverage for this ordering.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100