Skip to content

Parameter examples #821

New issue

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

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

Already on GitHub? # to your account

Merged
merged 4 commits into from
Mar 16, 2021
Merged

Parameter examples #821

merged 4 commits into from
Mar 16, 2021

Conversation

dslh
Copy link
Contributor

@dslh dslh commented Mar 8, 2021

Hello. It would be useful for us to be able to specify example values for parameters, as per the spec. I'm not familiar with the internals of this project, let me know if I'm missing something in the implementation or tests. Thanks!

Closes #762.

@dslh
Copy link
Contributor Author

dslh commented Mar 9, 2021

Hmmm, once I put this PR into action I find that the examples still aren't present in the resulting swagger file. Is there something I'm missing?

@LeFnord
Copy link
Member

LeFnord commented Mar 15, 2021

thanks @dslh … to your question, I have no idea, your code and your spec are looking good, so maybe you want to investigate a bit more?

@LeFnord
Copy link
Member

LeFnord commented Mar 16, 2021

@dslh … what did you think, should it be mörged and you investigate your issue in a separate PR … mayve it is not related to grape-swagger more to the used swagger client?

@LeFnord LeFnord merged commit 33366da into ruby-grape:master Mar 16, 2021
optional :obj, type: 'Object', documentation: { example: { 'foo' => 'bar' } }
end

get '/endpoint_with_examples' do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dslh … try with a post request ;)

@stevenou stevenou mentioned this pull request Aug 14, 2021
aka-momo pushed a commit to aka-momo/grape-swagger that referenced this pull request Feb 8, 2023
Co-authored-by: peter scholz <pscholz.le@gmail.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Example to param does not show up
2 participants