def add_swagger ( app , json_route , html_route ) : app . router . add_route ( 'GET' , json_route , create_swagger_json_handler ( app ) ) add_swagger_api_route ( app , html_route , json_route )
swagger api generate python
a convenience method for both adding a swagger . json route as well as adding a page showing the html documentation
def add_swagger(app, json_route, html_route):
    """
    a convenience method for both adding a swagger.json route,
    as well as adding a page showing the html documentation
    """
    app.router.add_route('GET', json_route, create_swagger_json_handler(app))
    add_swagger_api_route(app, html_route, json_route)