Skip to content

Test new API gen script #321

Test new API gen script

Test new API gen script #321

name: Generate API documentation
on:
push:
branches:
- development
- YDA-6066-update-generate-openapi-py3-test-ci
paths-ignore:
- 'file_formats/**'
- 'licenses/**'
- 'schemas/**'
- 'templates/**'
- 'terms/**'
- 'tests/**'
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- 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: Generate Yoda core API documentation
run: |
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: |
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: Show results for debugging
run: |
cat build/api_core.json | jq .
cat build/api_datarequest.json | jq .
cat build/api_deposit.json | jq .