Skip to content

Commit 7de500d

Browse files
Add Spectral validation
Validate snapshots of OpenAPI specifications with Spectral for errors.
1 parent 4a3ee61 commit 7de500d

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/lint.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,17 @@ jobs:
5656
config: '.markdownlint.json'
5757
globs: |
5858
**/*.md
59+
60+
- name: Setup Node
61+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
62+
with:
63+
node-version: '24.x'
64+
65+
- name: Install Spectral
66+
run: npm install --global "@stoplight/spectral-cli@${SPECTRAL_VERSION}"
67+
env:
68+
# renovate: datasource=npm packageName=@stoplight/spectral-cli
69+
SPECTRAL_VERSION: '6.15.0'
70+
71+
- name: Run Spectral
72+
run: spectral lint "./test/Swashbuckle.AspNetCore.IntegrationTests/snapshots/*" --display-only-failures --fail-severity error --format github-actions

.spectral.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
extends: ['spectral:oas']

0 commit comments

Comments
 (0)