grape-swagger
grape-swagger copied to clipboard
Add consumes and produces options to add_swagger_documentation
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.
@LeFnord wondering if you are interested in reviewing this since you mentioned this is a welcome feature in #677 :) Great contributing guide btw!
@spaceraccoon … sorry for late reply … yes this feature is welcome :) … thank you