Iterating on the idea raised in #508, this PR adds a Swagger documentation of the Flask API using Flasgger. It creates a Swagger app on the endpoint (/apidocs) which looks like this:
doc is also available as a json file at /apispec_1.json.
So far, the doc is stored in the docstring of each endpoint function. If it comes as an issue, it could be stored in many different ways:
with one file per function, files being located in a dir src/vanna/flask/apispec/ and applied to each endpoint function with the decorator @swag_from (ex: @swag_from("src/vanna/flask/apispec/get_config.yml"))
as a single json file, by exporting the file at the endpoint /apispec_1.json into a file at src/vanna/flask/apispec.json
Iterating on the idea raised in #508, this PR adds a Swagger documentation of the Flask API using Flasgger. It creates a Swagger app on the endpoint (/apidocs) which looks like this:
doc is also available as a json file at
/apispec_1.json
.So far, the doc is stored in the docstring of each endpoint function. If it comes as an issue, it could be stored in many different ways:
src/vanna/flask/apispec/
and applied to each endpoint function with the decorator@swag_from
(ex:@swag_from("src/vanna/flask/apispec/get_config.yml")
)/apispec_1.json
into a file atsrc/vanna/flask/apispec.json