My swagger (very bad: font-size is too big, place holder):
enter image description here
Example swagger:
enter image description here
how to config in flagger
My config:
from flasgger import Swagger
swagger_config = {
"headers": [],
"specs": [
{
"endpoint": 'company',
"route": '/company/base_company.json',
"rule_filter": lambda rule: True, # all in
"model_filter": lambda tag: True, # all in
}
],
"static_url_path": "/flasgger_static",
"swagger_ui": True,
"specs_route": "/apidocs/",
"swagger_ui_config": {
"docExpansion": "none", # collapse all sections
"defaultModelsExpandDepth": -1, # hide models section
"defaultModelExpandDepth": -1, # hide model definitions
"defaultModelRendering": "model", # show model by default
"displayRequestDuration": True, # show request duration
"filter": True, # enable filtering
"syntaxHighlight": False, # disable syntax highlight for better performance
"tryItOutEnabled": True, # enable try it out
}
}
swagger = Swagger(app, config=swagger_config)
Thanks for readingggg!