fix(sdd): add Spectral ruleset so contract-validate passes
Some checks failed
SDD Gate / Contract Validate (pull_request) Waiting to run
SDD Gate / Constitution Impact (pull_request) Waiting to run
CI / Unit & Component Tests (pull_request) Has been cancelled
CI / OCR Service Tests (pull_request) Has been cancelled
CI / Backend Unit Tests (pull_request) Has been cancelled
CI / fail2ban Regex (pull_request) Has been cancelled
CI / Semgrep Security Scan (pull_request) Has been cancelled
CI / Compose Bucket Idempotency (pull_request) Has been cancelled
SDD Gate / RTM Check (pull_request) Has been cancelled
Some checks failed
SDD Gate / Contract Validate (pull_request) Waiting to run
SDD Gate / Constitution Impact (pull_request) Waiting to run
CI / Unit & Component Tests (pull_request) Has been cancelled
CI / OCR Service Tests (pull_request) Has been cancelled
CI / Backend Unit Tests (pull_request) Has been cancelled
CI / fail2ban Regex (pull_request) Has been cancelled
CI / Semgrep Security Scan (pull_request) Has been cancelled
CI / Compose Bucket Idempotency (pull_request) Has been cancelled
SDD Gate / RTM Check (pull_request) Has been cancelled
Spectral v6 ships no implicit ruleset — the CI job exited 'no ruleset found'. Adds .spectral.yaml (extends spectral:oas, documentation-only warnings relaxed for design-time stubs), adds operation tags to the _example contract so it lints clean (0 results), and aligns the api-contract-stub note. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -86,11 +86,12 @@ paths:
|
||||
|
||||
## Validating the contract in CI
|
||||
|
||||
The `sdd-gate.yml` workflow runs, on PRs that touch a `api-contract.yaml`:
|
||||
The `sdd-gate.yml` `contract-validate` job lints any committed OpenAPI file changed in the PR:
|
||||
|
||||
```bash
|
||||
npx @stoplight/spectral-cli lint .specify/features/**/api-contract.yaml
|
||||
npx @stoplight/spectral-cli lint <your-contract>.yaml
|
||||
```
|
||||
|
||||
Spectral's default OpenAPI ruleset catches malformed specs, missing `operationId`s, and
|
||||
undefined `$ref`s. Add a `.spectral.yaml` at the repo root to tune rules if needed.
|
||||
The ruleset is `.spectral.yaml` at the repo root (extends `spectral:oas`; documentation-only
|
||||
warnings relaxed for design-time stubs). Spectral auto-discovers it. It catches malformed
|
||||
specs, undefined `$ref`s, and duplicate `operationId`s; tune `.spectral.yaml` to adjust.
|
||||
|
||||
Reference in New Issue
Block a user