grape-swagger icon indicating copy to clipboard operation
grape-swagger copied to clipboard

Add example to path param

Open herberzt opened this issue 9 years ago • 6 comments

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

herberzt avatar Dec 29 '15 14:12 herberzt

I can't even get a description to show up for a route_param. +1 Must fix.

mneumark avatar Feb 16 '16 23:02 mneumark

Yeah these aren't first class params in Grape. It needs work.

dblock avatar Feb 17 '16 13:02 dblock

+1 Is there a workaround to make desc appear in the documentation of route params?

thimios avatar Dec 23 '16 10:12 thimios

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?

rjaus avatar Jun 09 '20 13:06 rjaus

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

dblock avatar Jun 09 '20 13:06 dblock