Absentify · API Governance Rules
Absentify API Rules
Spectral linting rules defining API design standards and conventions for Absentify.
28 Rules
error 5
warn 19
info 4
Rule Categories
absentify
error
no
operation
path
query
schema
security
servers
Rules
error
absentify-operation-must-have-summary
Every operation must have a summary
$.paths[*][get,post,put,patch,delete]
warn
absentify-operation-must-have-description
Every operation must have a description
$.paths[*][get,post,put,patch,delete]
error
absentify-operation-must-have-operation-id
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
absentify-operation-must-have-tags
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
absentify-summary-title-case
Operation summaries should be in Title Case
$.paths[*][get,post,put,patch,delete].summary
warn
absentify-parameters-must-have-description
All parameters must have a description
$.paths[*][get,post,put,patch,delete].parameters[*]
error
absentify-request-body-must-have-schema
Request body content must define a schema
$.paths[*][post,put,patch].requestBody.content[*]
warn
absentify-response-must-have-schema
Successful responses should define a schema
$.paths[*][get,post,put,patch,delete].responses[200,201]
warn
absentify-security-must-use-api-key
Operations should use ApiKeyAuth security
$.paths[*][get,post,put,patch,delete]
warn
absentify-schema-properties-must-have-type
Schema properties must define a type
$.components.schemas[*].properties[*]
warn
absentify-info-must-have-contact
API info must have contact information
$.info
info
absentify-info-must-have-license
API info must have license information
$.info
error
absentify-server-must-be-defined
At least one server must be defined
$
warn
absentify-components-schemas-must-exist
Components section should define reusable schemas
$.components
info
absentify-paths-must-use-kebab-case
Path segments should use kebab-case
$.paths
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the absentify.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')]
info
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 snake_case (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.BAD_REQUEST) should be defined for error payloads.
$.components.schemas
warn
operation-documents-400
Operations should document a 400 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-401
Operations should document a 401 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-403
Operations should document a 403 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-500
Operations should document a 500 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