Amazon API Gateway · API Governance Rules
Amazon API Gateway API Rules
Spectral linting rules defining API design standards and conventions for Amazon API Gateway.
17 Rules
error 5
warn 10
info 2
Rule Categories
amazon
error
no
operation
operationid
path
query
schema
security
servers
Rules
error
amazon-info-title-required
API must have a title.
$.info
error
amazon-operation-summary-required
Operations must have summaries.
$.paths[*][get,post,put,patch,delete]
error
amazon-operation-operationid-required
Operations must have operationIds.
$.paths[*][get,post,put,patch,delete]
error
amazon-response-200-get
GET operations must return 200.
$.paths[*].get
info
amazon-schema-description
Schemas should have descriptions.
$.components.schemas[*]
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the amazonaws.com domain.
$.servers[*].url
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
operationid-casing
Operation IDs should be PascalCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].operationId
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
info
schema-properties-casing
Schema properties should be camelCase (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 (Error) should be defined for error payloads.
$.components.schemas
warn
operation-documents-404
Operations should document a 404 response (documented on 84% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-429
Operations should document a 429 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description