commercetools · API Governance Rules
commercetools API Rules
Spectral linting rules defining API design standards and conventions for commercetools.
9 Rules
error 4
warn 4
info 1
Rule Categories
commercetools
Rules
error
commercetools-info-contact
API info must include a contact block.
$.info
error
commercetools-server-https
Server URLs must use HTTPS.
$.servers[*].url
warn
commercetools-server-host
Public server URL should point to *.commercetools.com.
$.servers[*].url
info
commercetools-regional-server
Production server URLs should be regional (use {region}).
$.servers[*].url
error
commercetools-oauth-security
APIs must declare OAuth 2.0 security.
$.components.securitySchemes[*]
error
commercetools-operation-id
Every operation must declare a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
commercetools-operation-tags
Operations must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
commercetools-project-key-path
Project-scoped paths must include a {projectKey} parameter.
$.paths[?(@property.indexOf('{projectKey}') > -1)]
warn
commercetools-error-responses
Mutating operations should declare 400 and 409 error responses.
$.paths[*][post,put,patch,delete].responses