Added SUPPORTED_SUBMIT_METHODS swagger ui setting (#91)
parent
51ec07261d
commit
941ec8fdaf
|
|
@ -276,6 +276,15 @@ to the ``SwaggerUIBundle#initOAuth`` method, and must be a dictionary. See
|
||||||
|
|
||||||
**Default**: :python:`{}`
|
**Default**: :python:`{}`
|
||||||
|
|
||||||
|
SUPPORTED_SUBMIT_METHODS
|
||||||
|
------------------------
|
||||||
|
|
||||||
|
List of HTTP methods that have the Try it out feature enabled. An empty array disables Try it out for all operations.
|
||||||
|
This does not filter the operations from the display.
|
||||||
|
|
||||||
|
**Default**: :python:`['get','put','post','delete','options','head','patch','trace']` |br|
|
||||||
|
*Maps to parameter*: ``supportedSubmitMethods``
|
||||||
|
|
||||||
******************
|
******************
|
||||||
``REDOC_SETTINGS``
|
``REDOC_SETTINGS``
|
||||||
******************
|
******************
|
||||||
|
|
|
||||||
|
|
@ -46,6 +46,16 @@ SWAGGER_DEFAULTS = {
|
||||||
'DEFAULT_MODEL_DEPTH': 3,
|
'DEFAULT_MODEL_DEPTH': 3,
|
||||||
'OAUTH2_REDIRECT_URL': None,
|
'OAUTH2_REDIRECT_URL': None,
|
||||||
'OAUTH2_CONFIG': {},
|
'OAUTH2_CONFIG': {},
|
||||||
|
'SUPPORTED_SUBMIT_METHODS': [
|
||||||
|
'get',
|
||||||
|
'put',
|
||||||
|
'post',
|
||||||
|
'delete',
|
||||||
|
'options',
|
||||||
|
'head',
|
||||||
|
'patch',
|
||||||
|
'trace'
|
||||||
|
],
|
||||||
}
|
}
|
||||||
|
|
||||||
REDOC_DEFAULTS = {
|
REDOC_DEFAULTS = {
|
||||||
|
|
|
||||||
|
|
@ -94,6 +94,7 @@ class _UIRenderer(BaseRenderer):
|
||||||
'defaultModelExpandDepth': swagger_settings.DEFAULT_MODEL_DEPTH,
|
'defaultModelExpandDepth': swagger_settings.DEFAULT_MODEL_DEPTH,
|
||||||
'defaultModelsExpandDepth': swagger_settings.DEFAULT_MODEL_DEPTH,
|
'defaultModelsExpandDepth': swagger_settings.DEFAULT_MODEL_DEPTH,
|
||||||
'oauth2RedirectUrl': swagger_settings.OAUTH2_REDIRECT_URL,
|
'oauth2RedirectUrl': swagger_settings.OAUTH2_REDIRECT_URL,
|
||||||
|
'supportedSubmitMethods': swagger_settings.SUPPORTED_SUBMIT_METHODS,
|
||||||
}
|
}
|
||||||
data = {k: v for k, v in data.items() if v is not None}
|
data = {k: v for k, v in data.items() if v is not None}
|
||||||
if swagger_settings.VALIDATOR_URL != '':
|
if swagger_settings.VALIDATOR_URL != '':
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue