Skip to content

Commit 1a252cb

Browse files
authored
[AAP-59285] Adding openapi specification validation as a part of the sanity CI checks (ansible#887)
Adding CI checks for open API specification validation
1 parent 5fc2211 commit 1a252cb

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.github/workflows/sanity.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,9 @@ jobs:
3535

3636
- name: Run help text check
3737
run: ./manage.py help_text_check --applications=dab --ignore-file=./.help_text_check.ignore
38+
39+
- name: Validate OpenAPI Specification
40+
run: |
41+
./manage.py spectacular --format openapi-json --file dab-openapi.json
42+
openapi-spec-validator dab-openapi.json
43+
echo "✅ OpenAPI schema validation passed"

requirements/requirements_dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ isort==6.0.0 # Linting tool, if changed update pyproject.toml as well
1212
tox
1313
tox-docker
1414
typeguard
15+
openapi-spec-validator
1516
pytest
1617
pytest-asyncio
1718
pytest-xdist

0 commit comments

Comments
 (0)