Next generation OpenAPI v3 Integration for Flask based APIs. Based on Flasgger.
Project description
Flask-OpenAPI3-UI
Next generation OpenAPI v3 Integration for Flask based APIs. Based on Flasgger.
Install
pip install Flask-OpenAPI3-UI
Usage
You can start your Swagger spec with any default data providing a template:
from flask_openapi import Swagger
def main():
app = create_app()
app.config['SWAGGER'] = {
"uiversion": 3,
"openapi": "3.0.3",
"info": {
"title": "API documentation",
"description": "API docs for ",
"version": 1.0.0
},
"swagger_ui": True,
"basePath": "/api", # base bash for blueprint registration
"components": {
"securitySchemes": {
"bearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
},
"title": "API docs",
"optional_fields": ["components", "tags", "paths"],
"doc_dir": "/home/admin/flaskapp/src/api/",
}
Swagger(app=app)
And then the template is the default data unless some view changes it. You can also provide all your specs as template and have no views. Or views in external APP.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Flask-OpenAPI3-UI-0.0.0.tar.gz
(23.6 kB
view hashes)
Built Distribution
Close
Hashes for Flask_OpenAPI3_UI-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 935b3802a00c181cdfb80be4d5ff5ec9adbe12d06245b891b5ed87ea70abf901 |
|
MD5 | 3a479a492c6604fabd8c02f489095675 |
|
BLAKE2b-256 | c9fa9f4a82cb2df17937bb5ad8269da6e57da798bf76d7ab6a66850b9d8b6f78 |