Route param information not being propagated to mounted APIs
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 10k
- Forks
- 1.2k
- Avg merge
- 14h 38m
- Merged PRs (30d)
- 92
Description
When mounting an API within a route_param, the attributes of the route param are not propagating downward in the route.params property.
Attaching a failing test. #1620
This seems to touch on #1177 as to what the documented behavior should be for mount. I would expect type information etc. to propagate down.
Note this has downstream effects; when we use grape-swagger and look at the documentation for the API, the parameter types are wrong for these route parameters (which I believe is https://github.com/ruby-grape/grape-swagger/issues/532) It always shows type of Integer, and does not display description information etc. I believe this is the root cause of that failure but cannot be sure.
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 with the failing test attached in #1620 and trace how route parameters appear in route.params when an API is mounted inside a route_param. Compare the behavior with the documented mount behavior discussed in #1177; done when parameter type and description metadata propagate and the failing test passes.
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
- 38/100