From e50e1f9fb1bbc895c602cbd16e808f15462bb339 Mon Sep 17 00:00:00 2001 From: tattarw <61598610+tattarw@users.noreply.github.com> Date: Wed, 10 Jun 2026 08:25:34 +0000 Subject: [PATCH 1/4] ci: add .github/workflows/ci.yml --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..691686d --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 candidate in latest/openapi.yaml latest/openapi.yml openapi.yaml openapi.yml; do + if [ -f "$candidate" ]; then echo "spec=$candidate" >> $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 }}" --fail-severity=error From 9cf2acfbc3da089beb8e0113f63d0a0801650070 Mon Sep 17 00:00:00 2001 From: tattarw <61598610+tattarw@users.noreply.github.com> Date: Wed, 10 Jun 2026 08:27:11 +0000 Subject: [PATCH 2/4] ci: add .github/workflows/ci.yml From 3341e7279ce7a8338f49c0c4b9fde4475349e744 Mon Sep 17 00:00:00 2001 From: tattarw <61598610+tattarw@users.noreply.github.com> Date: Wed, 10 Jun 2026 08:29:33 +0000 Subject: [PATCH 3/4] ci: provide spectral:oas ruleset --- .github/workflows/ci.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 691686d..947a195 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,9 +17,9 @@ jobs: id: find shell: bash run: | - for candidate in latest/openapi.yaml latest/openapi.yml openapi.yaml openapi.yml; do - if [ -f "$candidate" ]; then echo "spec=$candidate" >> $GITHUB_OUTPUT; exit 0; fi + 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 }}" --fail-severity=error + run: npx --yes @stoplight/spectral-cli lint "${{ steps.find.outputs.spec }}" --ruleset .spectral.yaml --fail-severity=error From ff070cc9ec944d4c09363083ac1d7d56e1b7ec6d Mon Sep 17 00:00:00 2001 From: tattarw <61598610+tattarw@users.noreply.github.com> Date: Wed, 10 Jun 2026 08:29:34 +0000 Subject: [PATCH 4/4] ci: provide spectral:oas ruleset --- .spectral.yaml | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 .spectral.yaml diff --git a/.spectral.yaml b/.spectral.yaml new file mode 100644 index 0000000..8913a91 --- /dev/null +++ b/.spectral.yaml @@ -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