Easy OpenAPI specs and Swagger UI for your Flask API
See examples/changelog_090.py
Reverted the automatic set of json_encoder and allowed user to import LAzyJSONEncoder (tks @SBillion)
import
functionality/specs_route
to /anything
import:
from subfoldersadded support for template file argument.
having this yaml
definitions:
Data:
type: object
properties:
_id:
type: string
paths:
/cv:
put:
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Data'
responses:
200:
description: |
Please wait the calculation, you'll receive an email with results
delete:
parameters:
- name: body
in: body
required: true
schema:
$ref: '#/definitions/Data'
responses:
200:
description: |
Please wait the calculation, you'll receive an email with results
post:
responses:
200:
description: done
You can now load in
from flask import Flask
from flasgger import Swagger
app = Flask(__name__)
Swagger(app, template_file='test.yaml')
@app.route('/cv', methods=['POST', 'PUT', 'DELETE'])
def cv():
"""
Micro Service Based API for CV operations
This API is for job to CVs matching operations
"""
app.run(debug=True)
and get
decorator
package (#80)prefix_ids = True
for compat with <= 05.14 (see examples/compat.py)import: another.yml
to inherit YAML files.lib
static folderuiversion = 3
to support new experimental swagger UIvalidate
to abort with error so no need for try: validate...validate
does not require root
argument@swag_from