File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Lint OpenAPI Specs
2+
3+ on :
4+ push :
5+ branches : [ main, master ]
6+ paths :
7+ - ' specs/**'
8+ - ' .github/workflows/openapi-lint.yml'
9+ - ' .spectral.yaml'
10+ pull_request :
11+ branches : [ main, master ]
12+ paths :
13+ - ' specs/**'
14+ - ' .github/workflows/openapi-lint.yml'
15+ - ' .spectral.yaml'
16+
17+ jobs :
18+ lint :
19+ name : Lint OpenAPI files with Spectral
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Checkout repository
23+ uses : actions/checkout@v4
24+
25+ - name : Setup Node.js
26+ uses : actions/setup-node@v4
27+ with :
28+ node-version : ' 20'
29+
30+ - name : Install Spectral
31+ run : npm install -g @stoplight/spectral-cli
32+
33+ - name : Lint OpenAPI Specs
34+ run : spectral lint "specs/*.openapi.yml" --verbose
35+
Original file line number Diff line number Diff line change 1+ extends : spectral:oas
2+
3+ rules :
4+ # Disable validation of examples for non-JSON media types (like jsonl)
5+ # because Spectral tries to parse them as JSON and fails on multi-line/concatenated JSON
6+ oas3-valid-media-example : off
7+
You can’t perform that action at this time.
0 commit comments