Vapi · API Governance Rules
Vapi API Rules
Spectral linting rules defining API design standards and conventions for Vapi.
17 Rules
error 11
warn 6
Rule Categories
info
no
operation
paths
request
response
security
servers
Rules
error
info-title-required
Info title must be present
$.info
error
info-description-required
Info description must be present
$.info
warn
info-contact-required
Info contact block should be present
$.info
error
servers-required
At least one server URL must be declared
$
error
servers-vapi-base-url
Vapi APIs must use the api.vapi.ai base URL
$.servers[*].url
error
security-bearer-required
All operations must require bearer auth
$.paths[*][get,post,put,patch,delete]
error
operation-operationid-required
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-pascal-controller
Vapi operationIds follow the Controller_method NestJS pattern
$.paths[*][get,post,put,patch,delete].operationId
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-title-case
Summaries must be in Title Case
$.paths[*][get,post,put,patch,delete].summary
error
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-known
Tags should be one of the known Vapi tag set
$.paths[*][get,post,put,patch,delete].tags[*]
error
response-2xx-required
Every operation must define at least one 2xx response
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Every response must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
error
request-body-json
POST/PATCH request bodies must be application/json
$.paths[*][post,patch].requestBody.content
warn
paths-kebab-case
Path segments should be kebab-case
$.paths
error
no-empty-descriptions
Descriptions must not be empty
$..description