Skip to content

Instantly share code, notes, and snippets.

Created Jan 30, 2017
What would you like to do?
StopLight IO workflow for hosted docs from Django Rest Framework docstrings


One-time only.

  1. We export a Swagger spec file (api_swagger.json) from DRF code and import it into StopLight as a new API, first version.
  2. Commit this file on dev branch on GitHub.
  3. 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
  4. Export a Swagger spec file from StopLight.
  5. Commit that file as an update to api_swagger.json onto our staging branch on GitHub.

Dev workflow

  1. Developers make a change in our Python code, and update the docstrings accordingly.
  2. On git commit (on their feature branches), a git hook (custom built) will update api_swagger.json
  3. Pull requests dev -> staging will trigger a webhook (custom built) that will PUT the now MERGED api_swagger.json from staging to StopLight.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment