Skip to content

feat: auto-generate OpenAPI spec for miner HTTP endpoints #2

feat: auto-generate OpenAPI spec for miner HTTP endpoints

feat: auto-generate OpenAPI spec for miner HTTP endpoints #2

Workflow file for this run

name: OpenAPI Sync Check
on:
push:
branches:
- main
pull_request:
jobs:
check-openapi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Generate OpenAPI spec
run: |
python scripts/generate_openapi.py
- name: Check for unstaged changes
run: |
if [[ -n "$(git status --porcelain docs/openapi.json)" ]]; then
echo "::error::docs/openapi.json is out of sync with code! Please run 'python scripts/generate_openapi.py' locally and commit the changes."
git diff docs/openapi.json
exit 1
fi