One-time only.
- We export a Swagger spec file (
api_swagger.json
) from DRF code and import it into StopLight as a new API, first version. - Commit this file on
dev
branch on GitHub. - In StopLight we make any necessary changes:
- assign groups to the API endpoints
- we should not edit descriptions that were imported, because of possible Git merge conflicts later on
- Export a Swagger spec file from StopLight.
- Commit that file as an update to
api_swagger.json
onto ourstaging
branch on GitHub.
- Developers make a change in our Python code, and update the docstrings accordingly.
- On git commit (on their feature branches), a git hook (custom built) will update
api_swagger.json
- Pull requests
dev -> staging
will trigger a webhook (custom built) that will PUT the now MERGEDapi_swagger.json
fromstaging
to StopLight.