BuyWhere · API Governance Rules
BuyWhere API Rules
Spectral linting rules defining API design standards and conventions for BuyWhere.
14 Rules
error 3
warn 9
info 2
Rule Categories
buywhere
Rules
warn
buywhere-summary-title-case
Operation summaries should use Title Case.
$.paths[*][get,put,post,delete,patch].summary
error
buywhere-operation-id-camelcase
operationId should be lowerCamelCase verbNoun.
$.paths[*][get,put,post,delete,patch].operationId
error
buywhere-operation-id-required
All operations must have an operationId.
$.paths[*][get,put,post,delete,patch]
warn
buywhere-operation-tagged
Every operation must be tagged for Documentation grouping.
$.paths[*][get,put,post,delete,patch]
warn
buywhere-paths-kebab-case
Path segments should be lowercase kebab-case (allows {paramName}).
$.paths
error
buywhere-server-url-versioned
Server URLs must include a version segment (e.g. /v1).
$.servers[*].url
warn
buywhere-bearer-required
Non-auth operations must require BearerAuth security.
$.paths[?(@property != '/auth/register' && @property != '/auth')][get,put,post,delete,patch]
warn
buywhere-product-id-uuid
Product `id` path parameters must be format uuid.
$.paths[*][get,put,post,delete,patch].parameters[?(@.in=='path' && @.name=='id')].schema
warn
buywhere-limit-bounded
limit parameters should declare a maximum.
$.paths[*][get].parameters[?(@.name=='limit')].schema
info
buywhere-currency-enum
Currency parameter examples should be in the supported set (SGD, USD, VND, THB, MYR).
$.paths[*][get].parameters[?(@.name=='currency')].schema.default
warn
buywhere-401-response
Authenticated operations must document a 401 response.
$.paths[?(@property != '/auth/register' && @property != '/auth')][get,put,post,delete,patch].responses
warn
buywhere-429-on-search
Search endpoints must document a 429 (rate limit) response.
$.paths['/products/search'][get].responses
warn
buywhere-info-contact
API info must include contact email.
$.info.contact
info
buywhere-external-docs
API should reference MCP / external documentation.
$