Deliverect · API Governance Rules
Deliverect API Rules
Spectral linting rules defining API design standards and conventions for Deliverect.
32 Rules
error 9
warn 15
info 8
Rule Categories
get
info
openapi
operation
parameter
path
request
response
schema
security
servers
tag
tags
Rules
warn
info-title-deliverect-prefix
API title should start with "Deliverect".
$.info.title
warn
info-description-required
Info object must have a non-empty description.
$.info
error
info-version-required
Info object must declare a version.
$.info
info
info-contact-required
A contact should be provided.
$.info
warn
openapi-version-3-1
Specs should target OpenAPI 3.1.x.
$.openapi
error
servers-defined
At least one server must be defined.
$.servers
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
info
servers-deliverect-host
Production/staging hosts should be on the deliverect.com domain.
$.servers[*].url
warn
path-no-trailing-slash
Paths should not end with a trailing slash.
$.paths[*]~
error
path-no-double-slash
Paths must not contain a double slash.
$.paths[*]~
error
path-no-query-string
Paths must not embed a query string.
$.paths[*]~
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
error
operation-operationid-unique
operationId values must be unique across the document.
$
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-deliverect-prefix
Operation summaries should start with "Deliverect".
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Every operation must be tagged.
$.paths[*][get,post,put,patch,delete]
info
operation-microcks-extension
Operations should carry the x-microcks-operation extension for mocking.
$.paths[*][get,post,put,patch,delete]
info
tags-global-defined
A global tags array should be declared.
$
warn
tag-title-case
Tag names should use Title Case.
$.tags[*].name
info
tag-description
Global tags should have a description.
$.tags[*]
warn
parameter-description-required
Parameters must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Parameters must declare a schema with a type.
$.paths[*][get,post,put,patch,delete].parameters[*].schema
info
parameter-camelcase
Parameter names should use camelCase (Deliverect convention, e.g. channelLinkId, accountId).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='path' || @.in=='query')].name
warn
request-body-json-content
Request bodies should offer application/json content.
$.paths[*][post,put,patch].requestBody.content
warn
response-success-defined
Operations must define at least one 2xx response.
$.paths[*][get,post,put,patch,delete].responses
info
response-unauthorized-defined
Operations should document a 401 response (OAuth tokens can be rejected).
$.paths[*][get,post,put,patch,delete].responses
warn
response-description-required
Every response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
warn
security-global-defined
A global security requirement should be declared (OAuth 2.0).
$
warn
security-oauth2-scheme
An OAuth 2.0 security scheme should be defined in components.
$.components.securitySchemes
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get
info
schema-property-examples
Encourage examples on schema properties for richer mocks.
$.paths[*][get,post,put,patch,delete].responses[*].content.application/json.schema.properties[*]