Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example to path param #325

Open
herberzt opened this issue Dec 29, 2015 · 6 comments
Open

Add example to path param #325

herberzt opened this issue Dec 29, 2015 · 6 comments

Comments

@herberzt
Copy link

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

@dblock dblock added the bug? label Dec 29, 2015
@mneumark
Copy link

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

@dblock
Copy link
Member

dblock commented Feb 17, 2016

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

@thimios
Copy link

thimios commented Dec 23, 2016

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

@rjaus
Copy link

rjaus commented Jun 9, 2020

I'm facing this issue as well. I've written two tests that related to documentation & examples for route params.

rjaus@dd98a21

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?

@dblock
Copy link
Member

dblock commented Jun 9, 2020

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
Copy link
Member

dblock commented Oct 18, 2024

Can someone please verify whether #943 fixes this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants