Cataas · API Governance Rules
Cataas API Rules
Spectral linting rules defining API design standards and conventions for Cataas.
33 Rules
error 12
warn 17
info 4
Rule Categories
http
info
microcks
openapi
operation
parameter
paths
request
response
schema
security
servers
tag
Rules
warn
info-title-cataas-prefix
Info title must include the Cataas brand.
$.info.title
warn
info-description-required
Info description is required and must be substantive.
$.info
info
info-contact-defined
Info contact block should be defined.
$.info
info
info-license-defined
Info license block should be defined.
$.info
error
openapi-version-3
OpenAPI version must be 3.x.
$.openapi
error
servers-https-required
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-description-required
Each server should have a description.
$.servers[*]
warn
paths-kebab-case
Path segments must use lowercase kebab-case (excluding {placeholders}).
$.paths.*~
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths.*~
error
paths-no-query-string
Paths must not contain query strings.
$.paths.*~
error
operation-operationid-required
Every operation must have an operationId.
$.paths.*.*
warn
operation-operationid-camel-case
operationId must be lowerCamelCase.
$.paths.*.*.operationId
warn
operation-operationid-verb-prefix
operationId should begin with a recognised verb (get/list/create/update/delete/upload/admin).
$.paths.*.*.operationId
error
operation-summary-required
Every operation must have a summary.
$.paths.*.*
warn
operation-summary-cataas-prefix
Operation summaries should begin with 'CATAAS'.
$.paths.*.*.summary
warn
operation-description-required
Every operation must have a description.
$.paths.*.*
warn
operation-tags-required
Every operation must have at least one tag.
$.paths.*.*
warn
tag-global-list-defined
Global tags array must be defined.
$
warn
tag-description-required
Each global tag must have a description.
$.tags[*]
warn
tag-title-case
Tag names must be Title Case (no hyphens, no underscores).
$.tags[*].name
warn
parameter-description-required
Every parameter must have a description.
$.paths.*.*.parameters[*]
error
parameter-schema-required
Every parameter must define a schema.
$.paths.*.*.parameters[*]
error
request-body-content-required
Request bodies must declare content.
$.paths.*.*.requestBody
error
response-success-required
Every operation must define at least one 2xx response.
$.paths.*.*.responses
error
response-description-required
Every response must have a description.
$.paths.*.*.responses.*
info
schema-property-snake-case
Schema property names should be snake_case (with allowance for camelCase font* overlay params).
$.components.schemas.*.properties.*~
warn
schema-type-required
Schema property must declare a type (or $ref / oneOf / anyOf / allOf).
$.components.schemas.*.properties.*
warn
security-schemes-defined
Security schemes must be defined under components.
$.components
warn
security-admin-bearer
Admin operations should require bearer auth.
$.paths[?(@property.match(/^\/admin\//))].*
error
http-get-no-request-body
GET operations must not define a request body.
$.paths.*.get
error
http-delete-no-request-body
DELETE operations must not define a request body.
$.paths.*.delete
warn
http-post-has-request-body
POST operations should define a request body.
$.paths.*.post
info
microcks-extension-encouraged
Operations should define x-microcks-operation for mock compatibility.
$.paths.*.*