@@ -72,21 +72,12 @@ def _register_swagger_ui_rule(self, blueprint):
7272
7373 The Swagger UI scripts base URL should be specified as
7474 OPENAPI_SWAGGER_UI_URL.
75-
76- OPENAPI_SWAGGER_UI_SUPPORTED_SUBMIT_METHODS specifes the methods for
77- which the 'Try it out!' feature is enabled.
7875 """
7976 swagger_ui_path = self ._app .config .get ('OPENAPI_SWAGGER_UI_PATH' )
8077 if swagger_ui_path is not None :
8178 swagger_ui_url = self ._app .config .get ('OPENAPI_SWAGGER_UI_URL' )
8279 if swagger_ui_url is not None :
8380 self ._swagger_ui_url = swagger_ui_url
84- self ._swagger_ui_supported_submit_methods = (
85- self ._app .config .get (
86- 'OPENAPI_SWAGGER_UI_SUPPORTED_SUBMIT_METHODS' ,
87- ['get' , 'put' , 'post' , 'delete' , 'options' ,
88- 'head' , 'patch' , 'trace' ])
89- )
9081 blueprint .add_url_rule (
9182 _add_leading_slash (swagger_ui_path ),
9283 endpoint = 'openapi_swagger_ui' ,
@@ -110,8 +101,7 @@ def _openapi_swagger_ui(self):
110101 return flask .render_template (
111102 'swagger_ui.html' , title = self .spec .title ,
112103 swagger_ui_url = self ._swagger_ui_url ,
113- swagger_ui_supported_submit_methods = (
114- self ._swagger_ui_supported_submit_methods )
104+ swagger_ui_config = self ._app .config .get ('OPENAPI_SWAGGER_UI_CONFIG' , {})
115105 )
116106
117107
0 commit comments