7digital · API Governance Rules
7digital API Rules
Spectral linting rules defining API design standards and conventions for 7digital.
36 Rules
error 17
warn 15
info 4
Rule Categories
delete
global
info
no
oauth
openapi
operation
parameter
path
post
request
response
schema
servers
tag
Rules
error
info-title-prefix
API title must begin with "7digital" (the provider brand).
$.info.title
error
info-description-required
API info MUST include a non-trivial description (>= 60 chars).
$.info
error
info-version-required
API info MUST include a version.
$.info
warn
info-contact-required
API info SHOULD declare a contact (Client Success).
$.info
warn
info-license-required
API info SHOULD declare a license (commercial agreement).
$.info
error
openapi-version-pinned
OpenAPI must be 3.0.x.
$.openapi
error
servers-required
At least one server MUST be defined.
$
error
servers-https-only
Server URLs MUST use https (TLS).
$.servers[*].url
info
servers-7digital-host
Production servers SHOULD live under api.7digital.com.
$.servers[*].url
error
path-no-trailing-slash
Paths MUST NOT end with a trailing slash.
$.paths.*~
warn
path-camel-case-segments
Path segments use camelCase (e.g. `unlimitedStreaming`) per the existing 7digital convention.
$.paths.*~
error
operation-id-required
Every operation MUST declare an operationId.
$.paths.*[get,post,put,patch,delete]
error
operation-id-camel-case
operationId MUST be camelCase.
$.paths.*[get,post,put,patch,delete].operationId
warn
operation-id-verb-prefix
operationId SHOULD start with a known verb prefix.
$.paths.*[get,post,put,patch,delete].operationId
error
operation-summary-required
Every operation MUST declare a summary.
$.paths.*[get,post,put,patch,delete]
error
operation-summary-prefix
Operation summaries MUST begin with "7digital ".
$.paths.*[get,post,put,patch,delete].summary
warn
operation-description-required
Every operation MUST declare a description.
$.paths.*[get,post,put,patch,delete]
error
operation-tags-required
Every operation MUST be tagged.
$.paths.*[get,post,put,patch,delete]
info
operation-microcks-extension
Operations SHOULD declare x-microcks-operation for mock-server compatibility.
$.paths.*[get,post,put,patch,delete]
warn
global-tags-defined
Global tags array SHOULD be defined with descriptions.
$
warn
tag-description-required
Each global tag MUST have a description.
$.tags[*]
info
tag-title-case
Global tag names use Title Case (e.g. "Interactive Radio").
$.tags[*].name
warn
parameter-description-required
Each parameter MUST have a description.
$..parameters[*]
error
parameter-schema-required
Each parameter MUST have a schema.type.
$..parameters[*]
warn
parameter-camel-case
Parameter names use camelCase (e.g. `pageSize`, `releaseId`).
$..parameters[*].name
warn
request-body-content-type
Request bodies SHOULD use application/json or application/x-www-form-urlencoded (OAuth signing).
$.paths.*[post,put,patch,delete].requestBody.content
error
response-success-required
Each operation MUST declare at least one 2xx response.
$.paths.*[get,post,put,patch,delete].responses
warn
response-description-required
Every response MUST have a description.
$.paths.*[get,post,put,patch,delete].responses.*
info
response-error-401
Operations SHOULD declare a 401 response (authentication failure).
$.paths.*[get,post,put,patch,delete].responses
warn
schema-property-camel-case
Schema properties use camelCase (e.g. `releaseId`, `previewUrl`).
$.components.schemas..properties.*~
warn
schema-type-required
Schemas MUST declare a type or composition keyword.
$.components.schemas.*
error
global-security-required
A global security requirement MUST be defined (OAuth 1.0).
$
error
oauth-security-scheme-defined
Security schemes MUST include an OAuth 1.0 scheme.
$.components.securitySchemes
error
no-get-request-body
GET operations MUST NOT declare a request body.
$.paths.*.get
warn
post-put-patch-request-body
POST, PUT, and PATCH operations SHOULD declare a request body.
$.paths.*[post,put,patch]
warn
delete-no-request-body
DELETE operations MUST NOT declare a request body.
$.paths.*.delete