Blockchain.com · API Governance Rules
Blockchain.com API Rules
Spectral linting rules defining API design standards and conventions for Blockchain.com.
31 Rules
error 17
warn 11
info 3
Rule Categories
delete
get
info
openapi
operation
parameter
paths
request
response
schema
security
servers
tags
Rules
error
info-blockchain-title
Info title MUST start with `Blockchain.com `.
$.info.title
error
info-description-required
Info description MUST be present and at least 80 characters.
$.info
error
info-version-required
Info version MUST be present.
$.info
warn
info-contact-required
Info contact block SHOULD be present.
$.info
warn
info-license-required
Info license SHOULD be present.
$.info
error
openapi-version-3
OpenAPI version MUST be 3.0.x or 3.1.x.
$.openapi
error
servers-defined
Servers array MUST be defined.
$
error
servers-https
Server URLs MUST use HTTPS or WSS.
$.servers[*].url
warn
servers-description
Each server SHOULD have a description.
$.servers[*]
error
paths-no-trailing-slash
Paths MUST NOT have trailing slashes.
$.paths.*~
error
paths-no-query-string
Paths MUST NOT contain query strings.
$.paths.*~
error
operation-operationid-required
Every operation MUST have an operationId.
$.paths.*[get,post,put,patch,delete]
warn
operation-operationid-camelcase
operationId MUST be camelCase.
$.paths.*[get,post,put,patch,delete].operationId
error
operation-summary-required
Every operation MUST have a summary.
$.paths.*[get,post,put,patch,delete]
warn
operation-summary-blockchain-prefix
Operation summary SHOULD begin with `Blockchain.com `.
$.paths.*[get,post,put,patch,delete].summary
warn
operation-description-required
Every operation SHOULD have a description.
$.paths.*[get,post,put,patch,delete]
error
operation-tags-required
Every operation MUST have at least one tag.
$.paths.*[get,post,put,patch,delete]
info
operation-microcks-extension
Every operation SHOULD declare `x-microcks-operation` for mock-server compatibility.
$.paths.*[get,post,put,patch,delete]
warn
parameter-description-required
Every parameter SHOULD have a description.
$.paths.*[get,post,put,patch,delete].parameters[*]
error
parameter-schema-required
Every parameter MUST have a schema with a type.
$.paths.*[get,post,put,patch,delete].parameters[*]
warn
request-body-json-content-type
Request bodies SHOULD use `application/json`.
$.paths.*[post,put,patch].requestBody.content
error
response-success-required
Every operation MUST have a 2xx 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.*
warn
schema-property-snake-or-camel-case
Schema properties MUST use snake_case or camelCase (the two conventions Blockchain.com uses).
$.components.schemas[*].properties[*]~
warn
schema-object-description
Top-level component schemas SHOULD have descriptions.
$.components.schemas[*]
error
schema-type-required
Component schemas MUST declare a type.
$.components.schemas[*]
info
security-schemes-defined
Security schemes SHOULD be defined when the API has authenticated endpoints.
$.components
error
get-no-request-body
GET operations MUST NOT define a request body.
$.paths.*.get
error
delete-no-request-body
DELETE operations MUST NOT define a request body.
$.paths.*.delete
warn
tags-global-defined
Top-level `tags` array SHOULD be defined and described.
$
info
tags-title-case
Tag names SHOULD use Title Case.
$.tags[*].name