Skip to content

Commit

Permalink
Merge pull request #357 from maykinmedia/issue/fix-oas-check
Browse files Browse the repository at this point in the history
👷 [maykinmedia/open-api-framework#115] Always run OAS check
  • Loading branch information
stevenbal authored Mar 7, 2025
2 parents 95b727c + cb0b121 commit b0551fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 3 additions & 8 deletions .github/workflows/oas-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,19 @@ name: check-oas

on:
push:
paths:
- "src/openklant/components/*/openapi.yaml"
- .github/workflows/oas-check.yml
branches:
- '**'
workflow_dispatch:

jobs:
open-api-workflow-check-oas:
uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v1
uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v5.0.0
strategy:
matrix:
component:
- contactgegevens
- klantinteracties
with:
schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml'
schema-command: 'spectacular_for_component'
schema-options: "--component ${{ matrix.component }}"
schema-command: 'bin/generate_schema_for_component.sh'
schema-options: "${{ matrix.component }} src/openklant/components/${{ matrix.component }}/openapi.yaml"
python-version: '3.11'
django-settings-module: 'openklant.conf.ci'
2 changes: 2 additions & 0 deletions bin/generate_schema_for_component.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ OUTPUT_FILE=$2
echo "Generating OAS schema for $1..."
src/manage.py spectacular_for_component \
--file ${OUTPUT_FILE:-$SCHEMA_PATH/openapi.yaml} \
--lang="nl-nl" \
--validate \
--component $1

echo "Done."

0 comments on commit b0551fb

Please sign in to comment.