This is a template repo that can be used to convert your Data Resource API descriptor files to swagger documentation by using this library.
At BrightHive we use the Data Resource API to stand up a live database and API from a declarative document.
These documents are called descriptors. This repo will convert your descriptor to an OpenAPI Specification 3.0 file that thoroughly documents your API.
-
git clone
this repo. -
Ensure all of your API and table names are plural in your descriptor.
-
Add your descriptor files to the
descriptor
folder. -
Run
pipenv install
. -
Run
pipenv run python main.py
-
A number of files will be produced; copy
swagger.json
and paste it into swaggerhub to make it pretty and convert it to YAML. -
Clean up the swagger file. There will be a lot of errors.