Alation · API Governance Rules
Alation API Rules
Spectral linting rules defining API design standards and conventions for Alation.
26 Rules
error 14
warn 10
info 2
Rule Categories
alation
Rules
error
alation-auth-bearer-required
Alation APIs must use bearer token authentication
$.components.securitySchemes
error
alation-global-security-defined
Global security must be defined
$.security[*]
error
alation-info-title
API title must be present
$.info
error
alation-info-description
API description must be present
$.info
error
alation-info-version
API version must be present
$.info
warn
alation-path-trailing-slash
Alation API paths must end with a trailing slash
$.paths
error
alation-path-no-uppercase
Paths must be lowercase
$.paths
error
alation-operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
error
alation-operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
alation-operation-description-required
All operations must have a description
$.paths[*][get,post,put,patch,delete]
error
alation-operation-tags-required
All operations must have tags
$.paths[*][get,post,put,patch,delete]
error
alation-response-200-required
GET operations must define a 200 response
$.paths[*].get.responses
warn
alation-response-201-post
POST operations that create resources should return 201
$.paths[*].post.responses
warn
alation-response-401-required
APIs must document 401 Unauthorized
$.paths[*][get,post,put,patch,delete].responses
error
alation-response-content-type
Successful responses must specify content type
$.paths[*][get,post,put,patch,delete].responses[200,201].content
warn
alation-schema-description
All schemas must have descriptions
$.components.schemas[*]
info
alation-property-description
Schema properties should have descriptions
$.components.schemas[*].properties[*]
warn
alation-no-inline-schemas
Reuse schemas via $ref rather than inlining
$.paths[*][*].responses[*].content[*].schema
warn
alation-parameter-description
Parameters must have descriptions
$.paths[*][*].parameters[*]
info
alation-pagination-limit
List operations should support limit parameter
$.paths[*].get.parameters[*]
warn
alation-operation-id-camel-case
operationId must use camelCase
$.paths[*][*].operationId
warn
alation-schema-name-pascal-case
Schema names must use PascalCase
$.components.schemas
error
alation-request-body-content-type
Request bodies must specify application/json
$.paths[*][post,put,patch].requestBody.content
error
alation-request-body-schema
Request bodies must have a schema
$.paths[*][post,put,patch].requestBody.content.application/json
error
alation-servers-required
API must define at least one server
$
warn
alation-tags-defined
All operation tags must be defined at root level
$