Coveo · API Governance Rules
Coveo API Rules
Spectral linting rules defining API design standards and conventions for Coveo.
43 Rules
error 12
warn 15
info 16
Rule Categories
delete
examples
external
info
no
openapi
operation
parameter
paths
request
response
schema
security
servers
tags
Rules
warn
info-title-coveo-prefix
API title MUST begin with "Coveo " followed by the API name.
$.info.title
warn
info-description-required
API description MUST be present and non-trivial.
$.info
error
info-version-required
API version MUST be declared in info.version.
$.info
info
info-contact-coveo-support
Contact MUST be Coveo support.
$.info.contact
error
openapi-version-3-0
OpenAPI version MUST be 3.0.x (Coveo standard).
$.openapi
error
servers-required
At least one server MUST be declared.
$
error
servers-https-only
Server URLs MUST use HTTPS.
$.servers[*].url
warn
servers-coveo-domain
Server URLs SHOULD use a Coveo cloud domain.
$.servers[*].url
warn
paths-lowercase
Path segments MUST be lowercase (Coveo convention).
$.paths
error
paths-no-trailing-slash
Paths MUST NOT end with a trailing slash.
$.paths
error
paths-no-query-string
Paths MUST NOT include a query string.
$.paths
info
paths-organizations-prefix
Tenant-scoped admin endpoints SHOULD include an `/organizations/{organizationId}` prefix.
$.paths[?(@property =~ /^\/rest\/(source|field|extension|securityCache|notification|activity)/)]
error
operation-operationId-required
Every operation MUST declare a unique operationId.
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-operationId-camelcase
operationId MUST be camelCase.
$.paths[*][get,post,put,patch,delete,head,options].operationId
error
operation-summary-required
Every operation MUST have a summary.
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-summary-title-case
Operation summary SHOULD start with a capitalised verb (Title Case).
$.paths[*][get,post,put,patch,delete,head,options].summary
info
operation-description-required
Operations SHOULD have a description.
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-tags-required
Operations MUST be tagged.
$.paths[*][get,post,put,patch,delete,head,options]
info
tags-global-defined
A global `tags` array SHOULD be defined.
$
info
tags-have-description
Global tags SHOULD have descriptions.
$.tags[*]
warn
parameter-name-camelcase
Parameter names MUST be camelCase (Coveo convention).
$..parameters[*].name
info
parameter-description-required
Parameters SHOULD have a description.
$..parameters[*]
info
parameter-pagination-conventions
Pagination SHOULD use `firstResult` (offset) + `numberOfResults` (limit) for search, or `page`/`perPage` for admin lists.
$..parameters[?(@.name == 'offset' || @.name == 'limit' || @.name == 'size' || @.name == 'pageSize')]
warn
request-body-json-required
Request bodies SHOULD support `application/json`.
$..requestBody.content
error
response-2xx-required
Operations MUST declare at least one 2xx response.
$.paths[*][get,post,put,patch,delete,head,options].responses
info
response-401-on-secured
Operations SHOULD document a 401 Unauthorized response.
$.paths[*][get,post,put,patch,delete,head,options].responses
info
response-403-on-secured
Operations SHOULD document a 403 Forbidden response.
$.paths[*][get,post,put,patch,delete,head,options].responses
info
response-404-on-resource
Operations on a specific resource SHOULD document a 404 response.
$.paths[?(@property =~ /\\{[^}]+\\}/)][get,put,patch,delete].responses
info
response-429-rate-limit
Operations SHOULD document a 429 Too Many Requests response (Coveo enforces quotas).
$.paths[*][get,post,put,patch,delete,head,options].responses
info
response-500-server-error
Operations SHOULD document a 500 response.
$.paths[*][get,post,put,patch,delete,head,options].responses
warn
response-content-json
2xx responses SHOULD return `application/json`.
$.paths[*][get,post,put,patch,delete,head,options].responses[?(@property =~ /^2[0-9][0-9]$/)].content
warn
schema-property-camelcase
Schema property names MUST be camelCase.
$.components.schemas[*].properties[*]~
info
schema-description-required
Top-level schemas SHOULD have a description.
$.components.schemas[*]
warn
schema-type-required
Top-level schemas MUST declare a `type` (unless they use composition).
error
security-global-defined
Global `security` array MUST be defined (Coveo APIs are authenticated).
$
error
security-schemes-defined
components.securitySchemes MUST be present.
$.components
warn
security-oauth2-required
Coveo APIs MUST offer OAuth2 (Authorization Code or Client Credentials).
$.components.securitySchemes
error
no-get-request-body
GET operations MUST NOT define a request body.
$.paths[*].get
warn
no-delete-request-body
DELETE operations SHOULD NOT define a request body.
$.paths[*].delete
info
delete-returns-204
DELETE operations SHOULD return 204 No Content on success.
$.paths[*].delete.responses
warn
no-empty-descriptions
Descriptions MUST NOT be empty strings.
$..description
info
examples-encouraged
Operations SHOULD include at least one example.
$.paths[*][get,post,put,patch,delete].responses[?(@property =~ /^2[0-9][0-9]$/)].content.application/json
info
external-docs-encouraged
Provide externalDocs pointing at docs.coveo.com.
$