3M · API Governance Rules

3M API Rules

Spectral linting rules defining API design standards and conventions for 3M.

32 Rules error 13 warn 16 info 3
View Rules File View on GitHub

Rule Categories

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

Rules

warn
info-title-pattern
API info title should follow "3M ..." pattern.
$.info.title
warn
info-description-required
API info description must be present and at least 50 characters.
$.info
error
info-version-required
API version must be defined.
$.info
error
openapi-version-3
Must use OpenAPI 3.x.
$
error
servers-must-be-defined
Servers array must be defined and non-empty.
$
error
servers-https-required
Production server URLs must use HTTPS.
$.servers[*]
warn
servers-description-required
Each server must have a description.
$.servers[*]
warn
paths-kebab-case
Path segments should use kebab-case or camelCase, not underscores.
$.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]
warn
operation-description-required
Every operation should have a description.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-prefix
Every summary should start with "3M".
$.paths[*][get,post,put,patch,delete].summary
error
operation-operationid-required
Every operation must have an operationId.
$.paths[*][get,post,put,patch,delete]
warn
operation-operationid-camelcase
OperationId should use camelCase.
$.paths[*][get,post,put,patch,delete].operationId
error
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
tag-description-required
Global tags must have descriptions.
$.tags[*]
warn
parameter-description-required
Every parameter must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Every parameter must have a schema.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
parameter-example-encouraged
Parameters should include example values.
$.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
Every operation must define at least one success response.
$.paths[*][get,post,put,patch,delete].responses
error
response-description-required
Every response must have a description.
$.paths[*][get,post,put,patch,delete].responses[*]
error
response-401-required
Authenticated APIs must define 401 Unauthorized response.
$.paths[*][get,post,put,patch,delete].responses
warn
schema-description-required
Component schemas must have descriptions.
$.components.schemas[*]
warn
schema-type-required
Schemas should define a type.
$.components.schemas[*]
info
schema-properties-described
Schema properties should have descriptions.
$.components.schemas[*].properties[*]
info
schema-properties-examples
Schema properties should include example values.
$.components.schemas[*].properties[*]
error
security-schemes-defined
Security schemes must be defined in components.
$.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
no-empty-descriptions
Descriptions must not be empty.
$..description