Skip to content
This repository has been archived by the owner on Feb 7, 2022. It is now read-only.
/ flask-swaggerui Public archive

This library provides python Flask utilities and static assets for rendering Swagger UI.

License

Notifications You must be signed in to change notification settings

wikimedia/flask-swaggerui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This library provides python Flask utilities and static assets for rendering Swagger UI.

Example

from flask import Flask, jsonify

from flask_swaggerui import render_swaggerui, build_static_blueprint

app = Flask(__name__)


@app.route('/')
def root():
    return render_swaggerui(swagger_spec_path="/spec")


@app.route('/spec')
def spec():
    return jsonify({"some swagger": "spec stuff"})


# Adds static assets for swagger-ui to path
app.register_blueprint(build_static_blueprint("swaggerui", __name__))

app.run(port=8080, debug=True)

About

This library provides python Flask utilities and static assets for rendering Swagger UI.

Resources

License

Code of conduct

Stars

Watchers

Forks

Languages