ComfyUI/.github/workflows/openapi-validation.yml
bymyself 1eb00c0a51 Upgrade to OpenAPI 3.1.0 with prefixItems and streamlined validation
- Upgraded OpenAPI spec from 3.0.3 to 3.1.0
- Replaced QueueItem oneOf pattern with prefixItems for precise tuple validation
- Simplified GitHub Actions workflow to use only Python tests (removed redundant swagger-editor validation)
- All validation now handled by openapi-spec-validator which supports OpenAPI 3.1
- QueueItem now enforces exact tuple structure: [position, prompt_id, prompt, extra_data, outputs_to_execute]
2025-07-20 19:49:41 -07:00

33 lines
694 B
YAML

name: Validate OpenAPI
on:
push:
branches: [ master ]
paths:
- 'openapi.yaml'
- 'tests-api/openapi.yaml'
pull_request:
branches: [ master ]
paths:
- 'openapi.yaml'
- 'tests-api/openapi.yaml'
jobs:
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install test dependencies
run: |
pip install -r tests-api/requirements.txt
- name: Run OpenAPI spec validation tests
run: |
pytest tests-api/test_spec_validation.py -v