API Governance Rules
776 Spectral rules — each one a single, testable assertion about an API artifact you can copy directly into a .spectral.yaml and run in any CI/CD pipeline. Rules target five artifact types: OpenAPI covers the full surface of a REST API definition — info metadata, paths, operations, parameters, request bodies, responses, schemas, and security schemes; APIs.json checks the structure and completeness of API index files; JSON Schema enforces data model quality; OWASP encodes the OWASP API Security Top 10 as machine-checkable assertions; and AsyncAPI governs event-driven channel and message definitions. Rules use three severity levels: error for blocking issues, warn for advisory guidance, and info for informational checks. Expand any rule below to preview its Spectral YAML, or click View for the full definition with copy and download.