flask-restx
flask-restx copied to clipboard
Add an option to set more configuration for Swagger UI
I need to change the curl options displayed in the Swagger documentation. For that, Swagger has a curlOptions
parameter that can be set using the requestInterceptor
function.
Unfortunately, there doesn't seem to be a way to add this option in Swagger's configuration in the swagger-ui.html
template.
I'd love to have either a flask setting or an extension parameter to set such a function. It may also be a good idea to be able to insert any Swagger configuration in the template, but that's more generic that what I need.
I hope it's clear, if not please ask me. Thanks!
@abompard To get around the lack of customization, I just render a custom template (that flask-restx fully supports) and then you can pass whatever configurations you like to Swagger UI during the bundle creation.
See https://github.com/python-restx/flask-restx/issues/430#issuecomment-1104052909