Best Buy · API Governance Rules
Best Buy API Rules
Spectral linting rules defining API design standards and conventions for Best Buy.
32 Rules
error 15
warn 13
info 4
Rule Categories
delete
get
info
no
openapi
operation
parameter
paths
response
schema
security
servers
Rules
error
info-title-required
API info must have a title.
$.info
warn
info-title-prefix
API title should begin with "Best Buy".
$.info.title
error
info-description-required
API info must have a description.
$.info
error
info-version-required
API info must have a version.
$.info
error
openapi-version-3
All specs must use OpenAPI 3.0.x.
$
error
servers-defined
At least one server must be defined.
$
error
servers-https
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-bestbuy-domain
Server URLs should use the api.bestbuy.com domain.
$.servers[*].url
warn
paths-kebab-case
Path segments should use kebab-case (lowercase with hyphens).
$.paths[*]~
error
paths-no-trailing-slash
Paths must not have a trailing slash.
$.paths[*]~
error
operation-summary-required
All operations must have a summary.
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-summary-title-case
Operation summaries should start with "Best Buy" and use Title Case.
$.paths[*][get,post,put,patch,delete].summary
error
operation-description-required
All operations must have a description.
$.paths[*][get,post,put,patch,delete,options,head]
error
operation-id-required
All operations must have an operationId.
$.paths[*][get,post,put,patch,delete,options,head]
warn
operation-id-camel-case
operationId should use camelCase.
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
All operations must have at least one tag.
$.paths[*][get,post,put,patch,delete,options,head]
warn
parameter-description-required
All parameters must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
parameter-api-key-query
Best Buy API uses apiKey as a query parameter for authentication.
$.paths[*][get,post,put,patch,delete].parameters[?(@.name == 'apiKey')]
info
parameter-naming-camel-case
Parameter names should use camelCase.
$.paths[*][get,post,put,patch,delete].parameters[*].name
error
response-success-required
Operations must define at least one 2xx success response.
$.paths[*][get,post,put,patch,delete].responses
warn
response-401-unauthorized
Operations requiring authentication should define a 401 response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
All responses must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
warn
response-json-content
Success responses should return application/json content.
$.paths[*][get,post,put,patch,delete].responses['200','201'].content
warn
schema-description-required
Top-level schemas should have a description.
$.components.schemas[*]
info
schema-properties-camel-case
Schema property names should use camelCase.
$.components.schemas[*].properties[*]~
warn
schema-type-required
Schema definitions should have an explicit type.
$.components.schemas[*]
error
security-scheme-defined
Security schemes must be defined in components.
$.components.securitySchemes
warn
security-scheme-description
Security schemes should have a description.
$.components.securitySchemes[*]
error
get-no-request-body
GET operations must not have a request body.
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body.
$.paths[*].delete
info
operation-examples-encouraged
Operations should include examples for better developer experience.
$.paths[*][get,post,put,patch,delete].responses[*].content[*]
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description