Skip to content

Commit

Permalink
Add shell commands to generate schema in GH workflow.
Browse files Browse the repository at this point in the history
Clean up TODOs on schema generation management command.
  • Loading branch information
mgdaily committed Jun 14, 2021
1 parent 211f900 commit 6359cfb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/docs-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ jobs:
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build docs
run: |
python manage.py generateschema_mocked --file downtime.yaml
npx redoc-cli bundle downtime.yaml
mkdir docs; mv redoc-static.html docs/downtime.html
run: ./make-docs.sh
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3 # https://github.com/peaceiris/actions-gh-pages
Expand Down
12 changes: 0 additions & 12 deletions make-docs.sh

This file was deleted.

4 changes: 2 additions & 2 deletions schedule/management/commands/generateschema_mocked.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ class Command(GenerateSchemaCommand):
help = "Command to generate OpenAPI schema with external services mocked"
def __init__(self):
super().__init__()
# Mock out ConfigDB response for doc generation.
# TODO: Need to remove all "enums" from generalized docs - we don't need OCS docs to include the contents of LCO's ConfigDB
# Mock out ConfigDB response for doc generation.
# TODO: Add mock ConfigDB dataset for docs across all projects
responses._default_mock.__enter__()
responses.add(
responses.GET, settings.CONFIGDB_URL + '/sites/', match_querystring=True,
Expand Down

0 comments on commit 6359cfb

Please sign in to comment.