Skip to content

Add consumes and produces options to add_swagger_documentation #872

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

Conversation

spaceraccoon
Copy link
Contributor

As per issues #677 and #623, there is demand to allow for setting the global/default consumes and produces field value via add_swagger_documentation. In any case, the global fields are officially supported in the OpenAPI spec.

This will make it a lot easier to support non-JSON content-types at the global level, since the current default is application/json, forcing affected users to set the type at each endpoint instead of globally/by default.

@spaceraccoon
Copy link
Contributor Author

@LeFnord wondering if you are interested in reviewing this since you mentioned this is a welcome feature in #677 :) Great contributing guide btw!

@LeFnord
Copy link
Member

LeFnord commented Feb 19, 2023

@spaceraccoon … sorry for late reply … yes this feature is welcome :) … thank you

@LeFnord LeFnord merged commit 3f309db into ruby-grape:master Feb 19, 2023
Bhacaz pushed a commit to Bhacaz/grape-swagger that referenced this pull request Aug 31, 2023
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.

2 participants