Skip to content

Commit b0551fb

Browse files
authored
Merge pull request #357 from maykinmedia/issue/fix-oas-check
👷 [maykinmedia/open-api-framework#115] Always run OAS check
2 parents 95b727c + cb0b121 commit b0551fb

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

.github/workflows/oas-check.yml

+3-8
Original file line numberDiff line numberDiff line change
@@ -2,24 +2,19 @@ name: check-oas
22

33
on:
44
push:
5-
paths:
6-
- "src/openklant/components/*/openapi.yaml"
7-
- .github/workflows/oas-check.yml
8-
branches:
9-
- '**'
105
workflow_dispatch:
116

127
jobs:
138
open-api-workflow-check-oas:
14-
uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v1
9+
uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v5.0.0
1510
strategy:
1611
matrix:
1712
component:
1813
- contactgegevens
1914
- klantinteracties
2015
with:
2116
schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml'
22-
schema-command: 'spectacular_for_component'
23-
schema-options: "--component ${{ matrix.component }}"
17+
schema-command: 'bin/generate_schema_for_component.sh'
18+
schema-options: "${{ matrix.component }} src/openklant/components/${{ matrix.component }}/openapi.yaml"
2419
python-version: '3.11'
2520
django-settings-module: 'openklant.conf.ci'

bin/generate_schema_for_component.sh

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ OUTPUT_FILE=$2
2222
echo "Generating OAS schema for $1..."
2323
src/manage.py spectacular_for_component \
2424
--file ${OUTPUT_FILE:-$SCHEMA_PATH/openapi.yaml} \
25+
--lang="nl-nl" \
26+
--validate \
2527
--component $1
2628

2729
echo "Done."

0 commit comments

Comments
 (0)