Skip to content

Commit

Permalink
Test new API gen script
Browse files Browse the repository at this point in the history
  • Loading branch information
stsnel committed Dec 23, 2024
1 parent 5d93ed4 commit ab6a97f
Showing 1 changed file with 11 additions and 16 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/api-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- development
- YDA-6066-update-generate-openapi-py3-test-ci
paths-ignore:
- 'file_formats/**'
- 'licenses/**'
Expand All @@ -25,38 +26,32 @@ jobs:

- name: Install dependencies
run: |
sudo apt -y install jq
python -m pip install --upgrade pip
python -m pip install openapi-spec-validator
python -m pip install -r requirements.txt
- name: Create directory for API documentation
run: |
mkdir build
ln -s . rules_uu
- name: Generate Yoda core API documentation
run: |
export PYTHONPATH="${PYTHONPATH}:."
python tools/api/generate-openapi.py rules_uu --core > build/api_core.json
mkdir build
python tools/api/generate-openapi.py --core > build/api_core.json
- name: Validate Yoda core API documentation
run: |
openapi-spec-validator build/api_core.json
- name: Generate Yoda module API documentation
run: |
export PYTHONPATH="${PYTHONPATH}:."
python tools/api/generate-openapi.py rules_uu --module datarequest > build/api_datarequest.json
python tools/api/generate-openapi.py rules_uu --module deposit > build/api_deposit.json
python tools/api/generate-openapi.py --module datarequest > build/api_datarequest.json
python tools/api/generate-openapi.py --module deposit > build/api_deposit.json
- name: Validate Yoda module API documentation
run: |
openapi-spec-validator build/api_datarequest.json
openapi-spec-validator build/api_deposit.json
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BRANCH: gh-pages
FOLDER: build/
- name: Show results for debugging
run: |
cat build/api_core.json | jq .
cat build/api_datarequest.json | jq .
cat build/api_deposit.json | jq .

0 comments on commit ab6a97f

Please sign in to comment.