Rainbow · API Governance Rules
Rainbow API Rules
Spectral linting rules defining API design standards and conventions for Rainbow.
7 Rules
error 2
warn 5
Rule Categories
rainbow
Rules
error
rainbow-bearer-auth
Rainbow APIs must use Bearer token authentication
$.components.securitySchemes[*]
warn
rainbow-versioned-paths
All Rainbow API paths must include a version segment (v1.0, v2.0, etc.)
$.paths
warn
rainbow-pagination-params
Collection endpoints should support limit and offset pagination
$.paths[*].get.parameters[*].name
error
rainbow-operation-ids
All operations must have an operationId in camelCase
$.paths[*][*]
warn
rainbow-response-data-wrapper
Rainbow API responses should wrap primary data in a data field
$.components.schemas[?(@.properties.data)]
warn
rainbow-error-code-msg
Error responses must include code and msg fields
$.components.schemas[?(@.title == 'ErrorResponse' || contains(@, 'Error'))].properties
warn
rainbow-tags-required
All operations must include at least one tag
$.paths[*][*].tags