Svix · API Governance Rules
Svix API Rules
Spectral linting rules defining API design standards and conventions for Svix.
14 Rules
error 4
warn 8
info 2
Rule Categories
svix
Rules
warn
svix-operation-summary-title-case
Operation summaries are in Title Case ("Create Application", not "create application").
#AllOperations
error
svix-operation-id-camel-case
operationId values are lowerCamelCase (e.g. v1ApplicationCreate).
#AllOperations
error
svix-schema-pascal-case
Schema component names are PascalCase (ApplicationIn, EndpointOut).
$.components.schemas[*]~
warn
svix-property-camel-case
Schema properties are camelCase (createdAt, throttleRate, eventType).
$.components.schemas[*].properties[*]~
error
svix-path-version-prefix
Every path starts with /api/v1/ or /ingest/api/v1/.
$.paths[*]~
warn
svix-path-kebab-case
Path segments are kebab-case or snake_case templated IDs ({app_id}).
$.paths[*]~
error
svix-security-bearer-required
HTTP Bearer auth must be defined in components.securitySchemes.
$.components.securitySchemes
warn
svix-security-applied
Every non-health operation requires HTTPBearer auth.
$.paths[?([email protected](/health/))][get,put,post,delete,patch]
warn
svix-app-id-pattern
app_id path params have the prefixed-KSUID pattern `^app_[A-Za-z0-9]{27}$`.
$.components.schemas.ApplicationOut.properties.id
warn
svix-endpoint-id-pattern
endpoint_id values have the prefixed-KSUID pattern `^ep_[A-Za-z0-9]{27}$`.
$.components.schemas.EndpointOut.properties.id
warn
svix-msg-id-pattern
msg_id values have the prefixed-KSUID pattern `^msg_[A-Za-z0-9]{27}$`.
$.components.schemas.MessageOut.properties.id
info
svix-list-pagination
List responses use iterator-based pagination with `data`, `iterator`, `prevIterator`, `done`.
$.components.schemas[?(@property.match(/ListResponse_/))]
warn
svix-error-response-shape
4xx responses reference the standard HTTPError or HttpValidationError schemas.
$.paths[*][get,put,post,delete,patch].responses[?(@property.match(/^4\d\d$/))]
info
svix-post-idempotency-key
POST operations accept an Idempotency-Key header (Svix-wide idempotency support).
$.paths[*].post