Rook · API Governance Rules
Rook API Rules
Spectral linting rules defining API design standards and conventions for Rook.
17 Rules
error 2
warn 13
info 2
Rule Categories
error
no
operation
path
query
rook
schema
security
Rules
warn
rook-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
warn
rook-operation-id-camel-case
operationId must use camelCase
$.paths[*][*].operationId
error
rook-s3-path-bucket-required
S3 paths with /{key} must also include /{bucket} parameter
$.paths[*][get,put,delete,head].parameters[?(@.in == 'path')]
info
rook-s3-response-xml-content-type
S3-compatible responses should use application/xml content type
$.paths[*][*].responses[*].content
warn
rook-operation-description-required
All operations must have a description
$.paths[*][get,put,post,delete,head]
warn
rook-tags-title-case
All tags must use Title Case
$.paths[*][*].tags[*]
info
rook-error-response-schema
Error responses should reference an ErrorResponse schema
$.paths[*][*].responses[4xx,5xx]
error
rook-server-defined
At least one server must be defined
$
warn
rook-info-contact
Info object must include contact information
$.info
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
warn
schema-properties-casing
Schema properties should be PascalCase (the dominant convention in this API).
$.components.schemas[*].properties
warn
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
error-schema-defined
A shared error schema (ErrorResponse) should be defined for error payloads.
$.components.schemas
warn
operation-documents-404
Operations should document a 404 response (documented on 82% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description