flask_redoc package

Submodules

flask_redoc.version module

flask_redoc version file.

Module contents

flask_redoc Module.

class flask_redoc.Redoc(app=None, spec_file=None, config=None)[source]

Bases: object

Redoc Object.

DEFAULT_CONFIG = {'endpoint': 'docs', 'info': {}, 'marshmallow_schemas': [], 'openapi_version': '3.0.2', 'plugins': [<apispec_webframeworks.flask.FlaskPlugin object>], 'spec_route': '/docs', 'static_url_path': '/redoc_static', 'title': 'ReDoc', 'use_cdn': True, 'version': '1.0.0'}
docs_json()[source]
docs_view()[source]

Render the docs.html template.

docstrings_to_openapi()[source]

Transform Flask docstring documentation to openapi spec.

init_app(app)[source]

Initialize the Redoc.

Parameters

app – Flask app

load_spec_file(filename)[source]

Load the spec file.

Parameters

filename – spec filename

Returns

spec as dict

flask_redoc.strip_empties_from_dict(data)[source]

Strip empty dict

flask_redoc.strip_empties_from_list(data)[source]

Strip empty list