Add CI check that Flask routes and OpenAPI spec stay in sync (#3440) #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Spec drift check | |
| on: | |
| pull_request: | |
| paths: | |
| - main.py | |
| - spec.v1.yml | |
| - scripts/validate_spec.py | |
| - .github/workflows/spec-check.yml | |
| push: | |
| branches: [master] | |
| paths: | |
| - main.py | |
| - spec.v1.yml | |
| - scripts/validate_spec.py | |
| - .github/workflows/spec-check.yml | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install PyYAML | |
| run: pip install pyyaml | |
| - name: Validate spec matches Flask routes | |
| run: python scripts/validate_spec.py |