Clover · API Governance Rules
Clover API Rules
Spectral linting rules defining API design standards and conventions for Clover.
28 Rules
error 10
warn 14
info 4
Rule Categories
get
info
openapi
operation
parameter
paths
response
schema
security
server
servers
tag
Rules
warn
info-title-clover-prefix
API title should start with "Clover".
$.info
warn
info-description-required
Info must have a description of reasonable length.
$.info
error
info-version-required
Info must declare a version.
$.info
info
info-contact-required
Info should include contact information.
$.info
warn
openapi-version-3-1
Specs should target OpenAPI 3.1.0.
$
error
servers-defined
At least one server must be defined.
$
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*]
info
server-description-required
Each server should have a description (Production, Sandbox, region).
$.servers[*]
warn
paths-version-prefix
Paths should carry a version prefix (/v3 for Platform, /v1 for Ecommerce).
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
paths-no-query-string
Paths must not contain a query string.
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-clover-prefix
Operation summaries should begin with the provider name "Clover".
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Every operation must have a description.
$.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-camelcase
operationId should be camelCase.
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
tag-description-required
Global tags should have descriptions.
$.tags[*]
warn
tag-title-case
Tag names should be Title Case.
$.tags[*]
warn
parameter-description-required
Parameters should have descriptions.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
parameter-schema-typed
Parameters must define a schema with a type.
$.paths[*][get,post,put,patch,delete].parameters[*].schema
warn
response-success-defined
Operations should define a 2xx success response.
$.paths[*][get,post,put,patch,delete].responses
info
response-429-documented
Operations should document a 429 (rate limit) response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Each response must have a description.
$.paths[*][*].responses[*]
warn
schema-types-defined
Component schemas should define a type.
$.components.schemas[*]
warn
security-global-defined
A global security requirement should be declared.
$
error
security-schemes-defined
Security schemes must be defined in components.
$.components
error
get-no-request-body
GET operations must not declare a request body.
$.paths[*].get