Vehicle API · API Governance Rules
Vehicle API API Rules
Spectral linting rules defining API design standards and conventions for Vehicle API.
25 Rules
error 11
warn 10
info 4
Rule Categories
get
info
no
openapi
operation
parameter
paths
response
schema
security
servers
vehicle
Rules
error
info-title-required
Info title must be defined.
$.info
warn
info-description-required
Info description must be defined and non-empty.
$.info
error
info-version-required
API version must be defined.
$.info
error
openapi-version-3
Must use OpenAPI 3.x.
$
error
servers-defined
At least one server must be defined.
$
error
servers-https
Server URLs must use HTTPS.
$.servers[*].url
warn
paths-kebab-case
Path segments must use lowercase with hyphens or parameter brackets.
$.paths[*]~
warn
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,delete,patch]
warn
operation-summary-vehicle-api-prefix
Operation summaries must start with "Vehicle API".
$.paths[*][get,post,put,delete,patch].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,delete,patch]
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,delete,patch]
warn
operation-operationid-camelcase
operationId must use camelCase.
$.paths[*][get,post,put,delete,patch].operationId
warn
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,delete,patch]
warn
parameter-description-required
All parameters must have a description.
$..parameters[*]
info
parameter-api-key-in-query
API key should be passed as query parameter named api_key.
$.components.securitySchemes[*]
error
response-success-required
Every operation must have at least one 2xx response.
$.paths[*][get,post,put,delete,patch].responses
error
response-description-required
All responses must have a description.
$.paths[*][get,post,put,delete,patch].responses[*]
info
response-404-defined
GET operations by ID should define a 404 response.
$.paths[*].get.responses
warn
schema-description-required
Top-level component schemas must have a description.
$.components.schemas[*]
info
schema-properties-camelcase
Schema property names should use camelCase (Edmunds convention).
$.components.schemas[*].properties[*]~
error
security-schemes-defined
Security schemes must be defined in components.
$.components
info
vehicle-api-pagination
List operations should support pageSize and pageNum for pagination.
$.paths[*].get.operationId
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description