Acceldata · API Governance Rules

Acceldata API Rules

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

25 Rules error 10 warn 12 info 3
View Rules File View on GitHub

Rule Categories

acceldata

Rules

error
acceldata-require-api-key-security
All operations must require the X-API-Key security scheme
$.paths[*][get,post,put,patch,delete]
error
acceldata-api-key-header-name
API key must use X-API-Key header name
$.components.securitySchemes[*][?(@.in == 'header')]
warn
acceldata-path-kebab-case
API paths must use kebab-case
$.paths[*]~
warn
acceldata-no-trailing-slash
API paths must not have trailing slashes
$.paths[*]~
error
acceldata-require-200-response
GET operations must define a 200 response
$.paths[*].get.responses
warn
acceldata-require-400-response
Operations must define a 400 error response
$.paths[*][get,post,put,patch,delete].responses
warn
acceldata-require-401-response
Operations must define a 401 unauthorized response
$.paths[*][get,post,put,patch,delete].responses
warn
acceldata-require-500-response
Operations must define a 500 server error response
$.paths[*][get,post,put,patch,delete].responses
warn
acceldata-schema-require-description
All schema components must have a description
$.components.schemas[*]
info
acceldata-schema-properties-require-description
Schema properties should have descriptions
$.components.schemas[*].properties[*]
info
acceldata-require-id-property
Resource schemas should include an id property
$.components.schemas[?(@.type == 'object' && [email protected])]
error
acceldata-timestamp-format
Timestamp fields must use date-time format
$.components.schemas[*].properties[?(@.description =~ /time|date|at$/i)]
warn
acceldata-list-schema-require-total
List/collection schemas must include a total count property
$.components.schemas[?(@.title =~ /List$/)]
warn
acceldata-list-schema-require-page
List/collection schemas must include page and pageSize for pagination
$.components.schemas[?(@.title =~ /List$/)]
warn
acceldata-operations-require-tags
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
acceldata-operations-require-summary
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
error
acceldata-operations-require-operation-id
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
acceldata-operation-id-camel-case
OperationIds must use camelCase
$.paths[*][get,post,put,patch,delete].operationId
info
acceldata-list-operations-support-pagination
List operations should support page and pageSize query parameters
$.paths[?(!@~.match(/\{.*\}/))].get.parameters[*]
error
acceldata-require-json-content-type
Request bodies must use application/json content type
$.paths[*][post,put,patch].requestBody.content
error
acceldata-response-require-json-content-type
Success responses must return application/json
$.paths[*][get,post,put,patch,delete].responses[200,201].content
error
acceldata-info-require-version
API info must include a version
$.info
error
acceldata-info-require-description
API info must include a description
$.info
warn
acceldata-severity-values
Alert and rule severity must use standard values
$.components.schemas[*].properties.severity
warn
acceldata-status-values
Alert status must use standard values
$.components.schemas[*].properties.status