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

Support for hiding parameters from documentation #463

Merged

Conversation

anakinj
Copy link
Contributor

@anakinj anakinj commented Jul 1, 2016

There is a need to be able to hide some experimental/internal parameters from the documentation but still have the possibility to use declared_params to validate that the parameters have been defined for the endpoint.

This kind of solution would allow the definition of parameters but they would be excluded from the swagger documentation.

@anakinj
Copy link
Contributor Author

anakinj commented Jul 1, 2016

The Grape::Endpoint class is really long, and RuboCop is complaining about this(therefore the failing build). Any ideas on how to handle this one?

@kzaitsev
Copy link
Contributor

kzaitsev commented Jul 2, 2016

Just run rubocop -a or bump this limit manually

@anakinj anakinj force-pushed the support-hiding-of-endpoint-params branch from 734d295 to 15fd1bd Compare July 2, 2016 05:22
@anakinj
Copy link
Contributor Author

anakinj commented Jul 2, 2016

Ok, so mostly green now. But seems that latest Rack version requires Ruby >=2.2.0.
Do we want to add some kind of Gemfile logic for the tests that selects an older version of Rack if RUBY_VERSION < 2.2.0? Any other suggestions on how to handle this?

@anakinj anakinj force-pushed the support-hiding-of-endpoint-params branch from ee41971 to 07404a8 Compare July 2, 2016 18:46
@anakinj anakinj force-pushed the support-hiding-of-endpoint-params branch from 07404a8 to 32a59d1 Compare July 2, 2016 19:15
@LeFnord
Copy link
Member

LeFnord commented Jul 3, 2016

@anakinj … yeap the endpoint class is long and should be shorten by refactoring out functionality, but this should be done in another PR. For the gen versions maybe it could be used a similar mechanism as for grape, where different gemfiles exists and the right one would be loaded depending on ruby or specific gem version.
Thanks for your work 👍

@anakinj
Copy link
Contributor Author

anakinj commented Jul 3, 2016

@LeFnord, Should we maybe implement these different Gemfiles as a separate PR, the solution for this particular case was adding some logic to the single Gemfile that is used.

@LeFnord
Copy link
Member

LeFnord commented Jul 3, 2016

@anakinj … yeap, agree, it should be done in a different PR

@LeFnord LeFnord merged commit 60782ea into ruby-grape:master Jul 3, 2016
LeFnord pushed a commit to LeFnord/grape-swagger that referenced this pull request Feb 9, 2019
@ramses7083
Copy link

ramses7083 commented Jan 11, 2020

It is posible to hide require params? The readme shows this feature only for optional param.

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

Successfully merging this pull request may close these issues.

5 participants