flask-swagger-ui
Simple Flask blueprint for adding Swagger UI to your flask application.
Included Swagger UI version: 4.11.1.
Installation
pip install flask-swagger-ui
Usage
Example application:
from flask import Flask
from flask_swagger_ui import get_swaggerui_blueprint
app = Flask(__name__)
SWAGGER_URL = '/api/docs'
API_URL = 'http://petstore.swagger.io/v2/swagger.json'
swaggerui_blueprint = get_swaggerui_blueprint(
SWAGGER_URL,
API_URL,
config={
'app_name': "Test application"
},
)
app.register_blueprint(swaggerui_blueprint)
app.run()
Configuration
The blueprint supports overloading all Swagger UI configuration options that can be JSON serialized.
See https://github.com/swagger-api/swagger-ui#parameters for options.
Plugins and function parameters are not supported at this time.
OAuth2 parameters can be found at https://github.com/swagger-api/swagger-ui#oauth2-configuration .