Skip to content

Commit

Permalink
Merge pull request #159 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 88f5939 + b2b87fa commit eab1209
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 17 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/check-oas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,15 @@ name: check-oas

on:
push:
paths:
- "src/objecttypes/api/*/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
strategy:
matrix:
version:
- v2
uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v5.0.0
with:
schema-path: 'src/objecttypes/api/${{ matrix.version }}/openapi.yaml'
schema-path: 'src/objecttypes/api/v2/openapi.yaml'
schema-options: 'src/objecttypes/api/v2/openapi.yaml'
python-version: '3.11'
django-settings-module: 'objecttypes.conf.ci'
schema-command: bin/generate_schema.sh
apt-packages: 'libgdal-dev gdal-bin'
2 changes: 1 addition & 1 deletion bin/generate_schema.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ export SCHEMA_PATH=src/objecttypes/api/v2/openapi.yaml

OUTPUT_FILE=$1

src/manage.py spectacular --file ${OUTPUT_FILE:-$SCHEMA_PATH} --validate
src/manage.py spectacular --file ${OUTPUT_FILE:-$SCHEMA_PATH} --validate --lang="en"
2 changes: 1 addition & 1 deletion requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ click-plugins==1.1.1
# via celery
click-repl==0.2.0
# via celery
commonground-api-common==2.5.1
commonground-api-common==2.5.2
# via open-api-framework
coreapi==2.3.3
# via commonground-api-common
Expand Down
2 changes: 1 addition & 1 deletion requirements/ci.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ click-repl==0.2.0
# celery
codecov==2.1.13
# via -r requirements/test-tools.in
commonground-api-common==2.5.1
commonground-api-common==2.5.2
# via
# -c requirements/base.txt
# -r requirements/base.txt
Expand Down
2 changes: 1 addition & 1 deletion requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ codecov==2.1.13
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
commonground-api-common==2.5.1
commonground-api-common==2.5.2
# via
# -c requirements/ci.txt
# -r requirements/ci.txt
Expand Down
4 changes: 2 additions & 2 deletions src/objecttypes/api/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -449,11 +449,11 @@ components:
url:
type: string
format: uri
readOnly: true
minLength: 1
maxLength: 1000
description: URL reference to this object. This is the unique identification
and location of this object.
readOnly: true
uuid:
type: string
format: uuid
Expand Down Expand Up @@ -657,11 +657,11 @@ components:
url:
type: string
format: uri
readOnly: true
minLength: 1
maxLength: 1000
description: URL reference to this object. This is the unique identification
and location of this object.
readOnly: true
uuid:
type: string
format: uuid
Expand Down

0 comments on commit eab1209

Please sign in to comment.