Commit graph

3 commits

Author SHA1 Message Date
Lauri Ojansivu
2969161afb - More whitelabeling.
Thanks to xet7 !
2019-03-21 20:27:21 +02:00
Benjamin Tissoires
8be7eec2ca openapi: make the code python 3.5 compatible
It is common to use Ubuntu 16.04 to build snaps. For example,
the official docker container to build snaps is using this old
distribution.

However, Ubuntu 16.04 ships Python 3.5.X which is not compatible
with the f-strings in generate_openapi.py. This is sad, because
we need to use the `.format()` syntax to make it compatible.
2019-01-18 17:03:12 +01:00
Benjamin Tissoires
49d3eb5a3f Add OpenAPI description of the REST API
The API is generated by a custom script that parses the models directory.
Once the API is generated, tools like https://editor.swagger.io/ or
Python bravado can parse the file and generate a language friendly API.

Note that the tool generate an OpenAPI 2.0 version because bravado
doesn't handle OpenAPI 3.0.

The script also parses the JSDoc with a custom parser to allow
customization of the description of the fields.
2019-01-18 17:01:11 +01:00