Slice · API Governance Rules
Slice API Rules
Spectral linting rules defining API design standards and conventions for Slice.
14 Rules
error 3
warn 11
Rule Categories
slice
Rules
warn
slice-info-title
API info.title must be "Slice Public API".
$.info
warn
slice-info-description-required
API info.description must be present and at least 80 characters.
$.info
warn
slice-info-contact-email
info.contact.email must be present (Slice partner support).
$.info.contact
error
slice-openapi-version
Use OpenAPI 3.0.x.
$.openapi
warn
slice-security-apikey
An ApiKey security scheme must be defined (Slice issues partner API keys).
$.components.securitySchemes
warn
slice-global-security
A global security requirement must be applied.
$
warn
slice-paths-lowercase
Path segments must be lowercase (matches /shops, /orders).
$.paths[*]~
warn
slice-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
slice-operation-operationid
Every operation must declare an operationId.
$.paths[*][get,post,put,delete,patch]
warn
slice-operationid-camelcase
operationId should be camelCase (e.g. getShops, createOrder).
$.paths[*][get,post,put,delete,patch].operationId
warn
slice-operation-summary-title-case
Operation summaries must be present and Title Case (matches the live Slice summaries: "Get Shops", "Create Order", "Get Order", "Update Order", "Delete Order").
$.paths[*][get,post,put,delete,patch]
warn
slice-operation-tags-required
Every operation must be tagged (Shops or Orders).
$.paths[*][get,post,put,delete,patch]
error
slice-operation-responses-required
Every operation must define at least one response.
$.paths[*][get,post,put,delete,patch].responses
warn
slice-tags-title-case
Tag names must be Title Case.
$.tags[*].name