Sanity · API Governance Rules
Sanity API Rules
Spectral linting rules defining API design standards and conventions for Sanity.
7 Rules
error 3
warn 4
Rule Categories
sanity
Rules
error
sanity-bearer-auth-required
All Sanity API endpoints must use Bearer token authentication
$.paths[*][*]
error
sanity-https-servers-only
Sanity API servers must use HTTPS
$.servers[*]
error
sanity-operation-id-required
All operations must define operationId for client code generation
$.paths[*][*]
warn
sanity-tags-required
All operations must have tags for grouping
$.paths[*][*]
warn
sanity-dataset-path-parameter
Data operations should include dataset as path parameter
$.paths['/data/*'][*]
warn
sanity-response-200-defined
All Sanity operations should define a 200 or 201 response
$.paths[*][*].responses
warn
sanity-description-required
All operations must have a description
$.paths[*][*]