Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: ci
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
spectral:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Find OpenAPI spec
id: find
shell: bash
run: |
for c in latest/openapi.yaml latest/openapi.yml openapi.yaml openapi.yml; do
if [ -f "$c" ]; then echo "spec=$c" >> $GITHUB_OUTPUT; exit 0; fi
done
echo "No OpenAPI spec found"; exit 1
- name: Spectral lint
run: npx --yes @stoplight/spectral-cli lint "${{ steps.find.outputs.spec }}" --ruleset .spectral.yaml --fail-severity=error
7 changes: 7 additions & 0 deletions .spectral.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
extends: ["spectral:oas"]
rules:
oas3-server-not-example.com: off
info-contact: warn
info-description: warn
operation-tag-defined: warn
operation-tags: warn
Loading