Cleared · API Governance Rules
Cleared API Rules
Spectral linting rules defining API design standards and conventions for Cleared.
33 Rules
error 31
warn 1
info 1
Generated by API Evangelist
Written by API Evangelist tooling for Cleared's APIs. It is a starting point, not a ruleset Cleared publishes or enforces.
Rule Categories
info
license
mediatype
operation
path
property
response
schema
securityscheme
server
Rules
error
operation-has-summary
Every operation has a summary (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
error
operation-declares-4xx
Every operation declares at least one 4xx response (measured: 100% of this contract)
$.paths[*][get,post,put,patch,delete].responses
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
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: 87% of this contract)
$.components.schemas[*].properties[*]~
error
info-has-description
The contract's info block carries a description (measured: 100% of this contract)
$.info
error
info-title-present
Info declares title (measured: 100% of this contract)
$.info
error
info-description-present
Info declares description (measured: 100% of this contract)
$.info
error
info-license-present
Info declares license (measured: 100% of this contract)
$.info
error
info-version-present
Info declares version (measured: 100% of this contract)
$.info
error
info-version-semver
info.version is numeric (measured: 100% of this contract)
$.info.version
error
license-name-present
License declares name (measured: 100% of this contract)
$.info.license
error
server-url-present
Server declares url (measured: 100% of this contract)
$.servers[*]
error
operation-summary-present
Operation declares summary (measured: 100% of this contract)
$.paths[*][get,put,post,delete,patch,options,head,trace]
error
operation-summary-min-length
Operation.summary runs at least 33 characters (measured: 100% of this contract)
$.paths[*][get,put,post,delete,patch,options,head,trace].summary
error
operation-responses-present
Operation declares responses (measured: 100% of this contract)
$.paths[*][get,put,post,delete,patch,options,head,trace]
error
operation-security-present
Operation declares security (measured: 100% of this contract)
$.paths[*][get,put,post,delete,patch,options,head,trace]
error
mediatype-schema-present
MediaType declares schema (measured: 100% of this contract)
$.paths[*][get,put,post,delete,patch,options,head,trace].responses[*].content[*]
error
response-description-present
Response declares description (measured: 100% of this contract)
$.paths[*][get,put,post,delete,patch,options,head,trace].responses[*]
error
response-description-min-length
Response.description runs at least 13 characters (measured: 100% of this contract)
$.paths[*][get,put,post,delete,patch,options,head,trace].responses[*].description
error
schema-type-present
Schema declares type (measured: 100% of this contract)
$.components.schemas[*]
error
schema-type-values
Schema.type is one of object (measured: 100% of this contract)
$.components.schemas[*].type
warn
schema-required-present
Schema declares required (measured: 88% of this contract)
$.components.schemas[*]
error
schema-properties-present
Schema declares properties (measured: 100% of this contract)
$.components.schemas[*]
error
securityscheme-type-present
SecurityScheme declares type (measured: 100% of this contract)
$.components.securitySchemes[*]
error
securityscheme-type-values
SecurityScheme.type is one of apiKey, http (measured: 100% of this contract)
$.components.securitySchemes[*].type
error
securityscheme-description-present
SecurityScheme declares description (measured: 100% of this contract)
$.components.securitySchemes[*]
error
securityscheme-name-casing-pascal
SecurityScheme.name is pascal case (measured: 100% of this contract)
$.components.securitySchemes[*].name
error
securityscheme-in-values
SecurityScheme.in is one of header (measured: 100% of this contract)
$.components.securitySchemes[*].in
error
securityscheme-scheme-values
SecurityScheme.scheme is one of bearer (measured: 100% of this contract)
$.components.securitySchemes[*].scheme
error
securityscheme-bearerformat-values
SecurityScheme.bearerFormat is one of JWT, opaque (measured: 100% of this contract)
$.components.securitySchemes[*].bearerFormat
Spectral Ruleset
Work with this as data
Every ruleset here is available over the APIs.io API and to AI agents over MCP.