Amazon Comprehend · API Governance Rules

Amazon Comprehend API Rules

Spectral linting rules defining API design standards and conventions for Amazon Comprehend.

23 Rules error 8 warn 11 info 4
View Rules File View on GitHub

Rule Categories

comprehend 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.
$.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 should use HTTPS.
$.servers[*]
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-amazon-prefix
Operation summaries should start with Amazon Comprehend.
$.paths[*][get,post,put,patch,delete].summary
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-id-pascal-case
OperationIds should use PascalCase as per AWS convention.
$.paths[*][get,post,put,patch,delete].operationId
warn
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
request-body-json-content
Request bodies should use application/json.
$.paths[*][post,put,patch].requestBody.content
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.
$.components.schemas[*]
error
security-schemes-defined
Security schemes must be defined.
$.components
error
get-no-request-body
GET operations should not have a request body.
$.paths[*].get
info
comprehend-language-code-documented
Language code parameters should be documented with valid ISO 639-1 codes.
$.components.schemas.LanguageCode
info
comprehend-confidence-score-range
Confidence score properties should have minimum and maximum defined.
$.components.schemas[*].properties.Score
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]