-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (32 loc) · 944 Bytes
/
Copy pathvalidate.yml
File metadata and controls
41 lines (32 loc) · 944 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: Validate OpenAPI
on:
push:
branches: [main]
paths:
- "openapi.yaml"
- ".github/workflows/validate.yml"
pull_request:
paths:
- "openapi.yaml"
- ".github/workflows/validate.yml"
jobs:
validate:
name: Lint & validate spec
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install Redocly CLI
run: npm install -g @redocly/cli@latest
- name: Validate with Redocly
run: redocly lint openapi.yaml --format=stylish
- name: Install swagger-cli
run: npm install -g @apidevtools/swagger-cli
- name: Validate with swagger-cli
run: swagger-cli validate openapi.yaml
- name: Bundle (check for $ref errors)
run: redocly bundle openapi.yaml --output /tmp/bundled.yaml