Skip to content

Commit

Permalink
actions: validate swagger definition
Browse files Browse the repository at this point in the history
  • Loading branch information
booxter committed May 24, 2024
1 parent 28dcd23 commit 44a0465
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .flox/env/manifest.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1205,4 +1205,4 @@
"nixpkgs"
]
}
}
}
22 changes: 22 additions & 0 deletions .github/workflows/swagger-validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Swagger Validate
on: [push, pull_request]
jobs:
swagger-validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install nodejs
uses: actions/setup-node@v3
with:
node-version: '22'
- name: Install java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- name: Install openapi-generator-cli
run: |
npm install @openapitools/openapi-generator-cli -g
- name: Validate swagger.json
run: |
openapi-generator-cli validate -i swagger.json
2 changes: 1 addition & 1 deletion .github/workflows/swagger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ jobs:
run: |
python -m pip install --upgrade pip
pip install .
- name: Validate swagger.json
- name: Re-generate swagger.json
run: |
diff -u swagger.json <(swagger)

0 comments on commit 44a0465

Please sign in to comment.