Skip to content

Commit 4f33050

Browse files
committed
feat: add validator
1 parent 39272f5 commit 4f33050

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Validate OpenAPI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
validate-openapi:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v2
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: '14'
22+
23+
- name: Install OpenAPI CLI
24+
run: npm install -g @redocly/openapi-cli
25+
26+
- name: Validate OpenAPI files
27+
run: |
28+
for file in $(find . -name '*.yaml' -o -name '*.yml' -o -name '*.json'); do
29+
echo "Validating $file"
30+
openapi lint $file
31+
done

0 commit comments

Comments
 (0)