Blockworks · API Governance Rules
Blockworks API Rules
Spectral linting rules defining API design standards and conventions for Blockworks.
15 Rules
error 11
warn 3
info 1
Rule Categories
info
list
operation
path
property
response
servers
Rules
error
operation-has-operationid
Every operation declares an operationId (measured: 100% of this contract)
$.paths[*][get,post,put,patch,delete]
error
operation-has-summary
Every operation has a summary (measured: 100% of this contract)
$.paths[*][get,post,put,patch,delete]
error
operation-has-description
Every operation has a description (measured: 100% of this contract)
$.paths[*][get,post,put,patch,delete]
error
operation-has-tags
Every operation is tagged (measured: 100% of this contract)
$.paths[*][get,post,put,patch,delete]
error
operation-has-success-response
Every operation declares a 2xx response (measured: 100% of this contract)
$.paths[*][get,post,put,patch,delete].responses
warn
operation-declares-4xx
Every operation declares at least one 4xx response (measured: 99% of this contract)
$.paths[*][get,post,put,patch,delete].responses
warn
operation-declares-401-or-403
Every operation declares 401 or 403 (measured: 99% of this contract)
$.paths[*][get,post,put,patch,delete].responses
error
operation-secured
Every operation is covered by a security requirement (measured: 100% of this contract)
$.paths[*][get,post,put,patch,delete]
error
path-no-trailing-slash
Paths carry no trailing slash (measured: 100% of this contract)
$.paths[*]~
error
path-params-in-braces
Path parameters use {braces}, not :colon (measured: 100% of this contract)
$.paths[*]~
error
servers-https
Servers are https (measured: 100% of this contract)
$.servers[*].url
warn
list-pagination-parameter
Collection GETs take the `page` pagination parameter (measured: 96% of this contract)
$.paths[*].get
error
response-media-type
Responses are served as application/json (measured: 100% of this contract)
$.paths[*][get,post,put,patch,delete].responses[*].content
info
property-name-casing-camel
Schema property names are camel case (measured: 85% of this contract)
$.components.schemas[*].properties[*]~
error
info-has-description
The contract's info block carries a description (measured: 100% of this contract)
$.info
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.