Amazon Cognito · API Governance Rules
Amazon Cognito API Rules
Spectral linting rules defining API design standards and conventions for Amazon Cognito.
24 Rules
error 10
warn 11
info 3
Rule Categories
cognito
get
info
microcks
no
openapi
operation
parameter
request
response
schema
security
servers
Rules
error
info-title-required
OpenAPI info must have a title.
$.info
warn
info-description-required
OpenAPI info must have a description with at least 20 characters.
$.info
error
info-version-required
OpenAPI info must have a version field.
$.info
error
openapi-version-3
Specs must use OpenAPI 3.0.x.
$
error
servers-required
At least one server must be defined.
$
warn
servers-https-required
Server URLs must use HTTPS.
$.servers[*]
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-summary-amazon-prefix
Operation summaries should start with "Amazon Cognito".
$.paths[*][get,post,put,patch,delete,head,options].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete,head,options]
error
operation-id-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-id-pascal-case
OperationIds should use PascalCase as per AWS convention.
$.paths[*][get,post,put,patch,delete,head,options].operationId
warn
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete,head,options]
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][get,post,put,patch,delete,head,options].parameters[*]
error
parameter-schema-required
Every parameter must have a schema.
$.paths[*][get,post,put,patch,delete,head,options].parameters[*]
warn
request-body-json-content
Request bodies should use application/json content type.
$.paths[*][post,put,patch].requestBody.content
error
response-success-required
Every operation must define responses.
$.paths[*][get,post,put,patch,delete]
warn
response-description-required
Every response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
info
schema-description-recommended
Top-level schemas should have a description.
$.components.schemas[*]
warn
schema-type-defined
Schema objects should have a type defined.
$.components.schemas[*]
error
security-schemes-defined
Security schemes must be defined in components.
$.components
error
get-no-request-body
GET operations should not have a request body.
$.paths[*].get
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description
info
microcks-operation-extension
Operations should have x-microcks-operation for mock server compatibility.
$.paths[*][get,post,put,patch,delete]
info
cognito-scopes-documented
OAuth scopes used by Cognito User Pools should be documented in security schemes.
$.components.securitySchemes[*]