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

Include headers when body parameters have been defined #494

Merged

Conversation

anakinj
Copy link
Contributor

@anakinj anakinj commented Aug 16, 2016

Seems that the header parameters is left out from the documentation in some situations, this change will always merge the header parameters to the request parameters.

@anakinj anakinj force-pushed the merge-body-and-header-parameters branch from c334cfa to 69c95db Compare August 16, 2016 06:07
@kzaitsev
Copy link
Contributor

@LeFnord looks like workaround, but i prefer to merge all declared params into params all time, without check for !route.settings[:declared_params].present?, what do you think?

@LeFnord
Copy link
Member

LeFnord commented Aug 31, 2016

@Bugagazavr … with that, we would ignore params which are specified by the params key of desc, cause which are not declared one, but could be used in other ways

@kzaitsev
Copy link
Contributor

@LeFnord agreed that can be a really problem, how about add a new property, documentation: { ignore: true }, to skip unneeded params in documentation?

@LeFnord
Copy link
Member

LeFnord commented Sep 1, 2016

@Bugagazavr … this option was added here https://github.com/ruby-grape/grape-swagger/pull/463/files, only the name differs 😉 → hidden

@anakinj
Copy link
Contributor Author

anakinj commented Sep 8, 2016

So should we just remove all de conditions and always merge the headers?

@LeFnord
Copy link
Member

LeFnord commented Sep 8, 2016

@anakinj … maybe, but not in this PR, it should be done in a different one, cause it needs a wider context

please rebase, so it could be mörged

@anakinj anakinj force-pushed the merge-body-and-header-parameters branch from 69c95db to f7f35af Compare September 8, 2016 18:32
@anakinj
Copy link
Contributor Author

anakinj commented Sep 8, 2016

@LeFnord, this is now rebased and ready to go.

@LeFnord
Copy link
Member

LeFnord commented Sep 8, 2016

👍 … thanks

@LeFnord LeFnord merged commit 3e855dd into ruby-grape:master Sep 8, 2016
LeFnord pushed a commit to LeFnord/grape-swagger that referenced this pull request Feb 9, 2019
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.

4 participants