The Color API · API Governance Rules
The Color API API Rules
Spectral linting rules defining API design standards and conventions for The Color API.
10 Rules
error 4
warn 6
Rule Categories
colorapi
Rules
warn
colorapi-operations-must-have-tags
All Color API operations must be tagged (Colors or Schemes).
$.paths[*][get]
error
colorapi-operations-must-have-operationid
All operations must define an operationId.
$.paths[*][get]
warn
colorapi-operations-must-have-summary
All operations must have a summary in Title Case.
$.paths[*][get]
warn
colorapi-color-input-params-must-have-examples
Color input parameters (hex, rgb, hsl, cmyk) should include examples.
$.paths[*][get].parameters[?(@.name == 'hex' || @.name == 'rgb' || @.name == 'hsl' || @.name == 'cmyk')]
error
colorapi-format-param-must-use-enum
The format parameter must constrain values to json, html, or svg.
$.paths[*][get].parameters[?(@.name == 'format')].schema
error
colorapi-scheme-mode-must-use-enum
The mode parameter must constrain values to the supported scheme modes.
$.paths[*][get].parameters[?(@.name == 'mode')].schema
error
colorapi-responses-must-include-200
All operations must define a 200 success response.
$.paths[*][get].responses
warn
colorapi-responses-must-include-400
All operations must define a 400 error response for invalid color input.
$.paths[*][get].responses
warn
colorapi-parameters-must-have-descriptions
All query parameters must have descriptions.
$.paths[*][get].parameters[*]
warn
colorapi-responses-must-define-content-schema
All 200 responses must reference a schema.
$.paths[*][get].responses.200.content.application/json