ACORD · API Governance Rules

ACORD API Rules

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

33 Rules error 14 warn 17 info 2
View Rules File View on GitHub

Rule Categories

delete get info microcks no openapi operation parameter paths post request response schema security servers tags

Rules

error
info-title-required
OpenAPI info.title must be present and non-empty
$.info
warn
info-description-required
OpenAPI info.description must be present with meaningful content
$.info
error
info-version-required
OpenAPI info.version must be defined
$.info
warn
info-contact-required
API info should include contact information
$.info
error
openapi-version-3x
ACORD APIs must use OpenAPI 3.x
$
error
servers-required
At least one server must be defined
$
warn
servers-https
Server URLs should use HTTPS in production
$.servers[*]
warn
paths-kebab-case
Path segments should use kebab-case
$.paths[*]~
error
paths-no-trailing-slash
Paths must not end with a trailing slash
$.paths[*]~
error
operation-summary-required
All operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
All operations should have a description
$.paths[*][get,post,put,patch,delete]
error
operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
operation-id-camel-case
operationId should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
info
operation-summary-acord-prefix
ACORD operation summaries should start with 'ACORD'
$.paths[*][get,post,put,patch,delete].summary
warn
tags-global-defined
Global tags array should be defined
$
warn
tags-description-required
All global tags should have descriptions
$.tags[*]
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
All operations must define at least one 2xx response
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
All response entries must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
warn
response-401-defined
APIs with authentication should define 401 responses
$.paths[*][get,post,put,patch,delete].responses
warn
response-404-on-id-paths
Paths with ID parameters should define 404 responses
$.paths[*~[*Id}*]][get,patch,delete].responses
warn
schema-description-required
All top-level schemas should have a description
$.components.schemas[*]
warn
schema-type-required
Schema properties should define a type
$.components.schemas[*].properties[*]
error
security-schemes-defined
Security schemes should be defined in components
$
warn
security-global-defined
Global security should be defined
$
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
post-has-request-body
POST operations should have a request body
$.paths[*].post
error
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
microcks-operation-present
Operations should have x-microcks-operation for mock testing
$.paths[*][get,post,put,patch,delete]