AhaSend · API Governance Rules

AhaSend API Rules

Spectral linting rules defining API design standards and conventions for AhaSend.

28 Rules error 11 warn 14 info 3
View Rules File View on GitHub

Rule Categories

delete get idempotency info no openapi operation parameter paths request response schema security servers

Rules

warn
info-title-format
API title must start with "AhaSend"
$.info.title
error
info-description-required
API must have a non-empty description
$.info
error
info-version-required
API must specify a version
$.info
warn
info-contact-email
API contact email should be provided
$.info.contact
warn
openapi-version
Use OpenAPI 3.x
$
error
servers-defined
Servers array must be defined and non-empty
$
error
servers-https-only
Server URLs must use HTTPS
$.servers[*].url
warn
paths-kebab-case
Path segments must use kebab-case
$.paths[*]~
warn
paths-no-trailing-slash
Paths must not end with a trailing slash
$.paths[*]~
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-summary-prefix
Operation summaries must start with "AhaSend"
$.paths[*][get,post,put,patch,delete].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-camel-case
operationId must use camelCase
$.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,head,options]
warn
parameter-description-required
All parameters must have a description
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
All parameters must have a schema
$.paths[*][get,post,put,patch,delete].parameters[*]
warn
request-body-description
Request bodies should have a description
$.paths[*][post,put,patch].requestBody
error
response-success-required
Operations must have a 2xx success response
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
All responses must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
info
schema-property-description
Top-level schema properties should have descriptions
$.components.schemas[*].properties[*]
warn
schema-type-required
Schema properties should have a type defined
$.components.schemas[*].properties[*]
error
security-schemes-defined
Security schemes must be defined
$.components.securitySchemes
info
security-bearer-format
Bearer auth token format should be documented
$.components.securitySchemes[*][?(@.scheme == 'bearer')]
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
warn
delete-no-request-body
DELETE operations should not have a request body
$.paths[*].delete
warn
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
idempotency-key-documented
POST endpoints should document idempotency key header support
$.paths[*].post.parameters[*]