From 6363790c71f7e77331848d072f9212150fbc2055 Mon Sep 17 00:00:00 2001 From: Sietse Snel Date: Mon, 23 Dec 2024 20:21:32 +0100 Subject: [PATCH] Test new API gen script --- .github/workflows/api-documentation.yml | 27 ++++++++++--------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/.github/workflows/api-documentation.yml b/.github/workflows/api-documentation.yml index 8b7c62fed..f4dc4d737 100644 --- a/.github/workflows/api-documentation.yml +++ b/.github/workflows/api-documentation.yml @@ -4,6 +4,7 @@ on: push: branches: - development + - YDA-6066-update-generate-openapi-py3-test-ci paths-ignore: - 'file_formats/**' - 'licenses/**' @@ -25,19 +26,15 @@ 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: | @@ -45,18 +42,16 @@ jobs: - 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 .