grape-swagger
grape-swagger copied to clipboard
Add example to path param
I have been adding examples to some of my parameters, but up to this point they have not been path params. I tried to do it with the following but it doesn't show up.
route_param :id, desc: "User ID", documentation: { example: User.first.id } do
I can't even get a description to show up for a route_param
. +1 Must fix.
Yeah these aren't first class params
in Grape. It needs work.
+1 Is there a workaround to make desc appear in the documentation of route params?
I'm facing this issue as well. I've written two tests that related to documentation & examples for route params.
https://github.com/rjaus/grape-swagger/commit/dd98a217b166ca3799eb4fff8fae335a67202a3a
I'm happy to try and fix it too, if someone will point me in the right direction. @dblock where does this need to be fixed? What needs to be changed?
I'm happy to try and fix it too, if someone will point me in the right direction. @dblock where does this need to be fixed? What needs to be changed?
in this project, but I don't know specifically where