grape icon indicating copy to clipboard operation
grape copied to clipboard

Route param information not being propagated to mounted APIs

Open jnardone opened this issue 8 years ago • 3 comments

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.

jnardone avatar Apr 21 '17 20:04 jnardone

This is still an issue. Route params with type: 'String' revert to type: 'Integer' inside mounted APIs.

cberkom avatar Aug 12 '19 23:08 cberkom

This is still an issue. Route params with type: 'String' revert to type: 'Integer' inside mounted APIs.

Give a shot at fixing it?

dblock avatar Aug 13 '19 13:08 dblock

Sure, but I'm unclear how this configuration works. Any suggestions on how to start?

cberkom avatar Aug 13 '19 18:08 cberkom