Stanley Black & Decker · API Governance Rules
Stanley Black & Decker API Rules
Spectral linting rules defining API design standards and conventions for Stanley Black & Decker.
20 Rules
error 7
warn 12
info 1
Rule Categories
sbd
Rules
warn
sbd-operation-ids-camel-case
Operation IDs must use camelCase naming convention
$.paths[*][*].operationId
warn
sbd-operation-summary-title-case
Operation summaries must use Title Case
$.paths[*][*].summary
error
sbd-api-versioned-paths
All API paths must be versioned with /v1/ prefix
$.paths
error
sbd-bearer-auth-required
All operations must use Bearer token authentication
$.paths[*][*]
error
sbd-get-operations-200
GET operations must define a 200 response
$.paths[*].get
warn
sbd-post-create-201
POST operations that create resources must return 201
$.paths[*].post
error
sbd-unauthorized-response
All operations must define a 401 Unauthorized response
$.paths[*][*]
warn
sbd-not-found-response
Operations with path parameters should define a 404 response
$.paths[*][*][?(@.parameters[*].in=='path')]
warn
sbd-rate-limit-response
All operations must define a 429 Too Many Requests response
$.paths[*][*]
warn
sbd-operation-tags-required
All operations must have at least one tag
$.paths[*][*].tags
warn
sbd-tags-title-case
All tags must use Title Case
$.paths[*][*].tags[*]
warn
sbd-path-kebab-case
Path segments must use kebab-case
$.paths
warn
sbd-path-plural-nouns
Collection resource paths should use plural nouns
$.paths
error
sbd-path-parameters-required
Path parameters must be marked as required
$.paths[*][*].parameters[?(@.in=='path')]
warn
sbd-parameter-descriptions
All parameters must have descriptions
$.paths[*][*].parameters[*]
warn
sbd-schemas-have-properties
Schema objects should define properties
$.components.schemas[*]
warn
sbd-info-contact
API must have contact information
$.info
error
sbd-info-description
API must have a description
$.info
error
sbd-servers-defined
API must define at least one server
$
info
sbd-external-docs
API should reference external documentation
$