Add OpenAPI spec validation hook (Redocly CLI)
PostToolUse hook triggers on openapi/*.yaml edits and runs redocly lint with the recommended ruleset (security-defined disabled since endpoints are intentionally public). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
10
README.md
10
README.md
@@ -150,6 +150,16 @@ ArchUnit enforces hexagonal boundaries: domain must not depend on adapters, appl
|
||||
|---------------------|------------------|-------------------|
|
||||
| Prettier | `npm run format` | Formatting issues |
|
||||
|
||||
### OpenAPI Spec (YAML)
|
||||
|
||||
**After editing an `openapi/*.yaml` file** (PostToolUse hook):
|
||||
|
||||
| What | Command | Fails on |
|
||||
|---------------------|--------------------------|-----------------------------------|
|
||||
| Redocly CLI | `redocly lint api.yaml` | Structural and ruleset violations |
|
||||
|
||||
Validates the OpenAPI 3.1 spec against the Redocly `recommended` ruleset (with `security-defined` disabled, since endpoints are intentionally public). Runs via `npx @redocly/cli@latest`.
|
||||
|
||||
## Deployment
|
||||
|
||||
### Docker Compose
|
||||
|
||||
Reference in New Issue
Block a user