Consumer Product Safety Commission · API Governance Rules
Consumer Product Safety Commission API Rules
Spectral linting rules defining API design standards and conventions for Consumer Product Safety Commission.
7 Rules
error 3
warn 2
info 2
Rule Categories
cpsc
Rules
error
cpsc-info-contact
API contact information must be present.
$.info
error
cpsc-server-https
All server URLs must use HTTPS.
$.servers[*].url
warn
cpsc-server-host
Server URLs must point to a *.cpsc.gov or saferproducts.gov host.
$.servers[*].url
error
cpsc-operation-id
Every operation must declare a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
cpsc-operation-tags
Operations must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
cpsc-format-parameter
GET endpoints should accept a `format` parameter for JSON or XML.
$.paths[*].get
info
cpsc-content-types
Responses should declare application/json and application/xml.
$.paths[*].get.responses['200'].content