Cobalt · API Governance Rules

Cobalt API Rules

Spectral linting rules defining API design standards and conventions for Cobalt.

13 Rules error 4 warn 8 info 1
View Rules File View on GitHub

Rule Categories

cobalt

Rules

error
cobalt-info-contact
API contact information must be present.
$.info
warn
cobalt-info-license
API license must be declared.
$.info
warn
cobalt-info-terms
API termsOfService link should be declared.
$.info
error
cobalt-server-https
All server URLs must use HTTPS.
$.servers[*].url
warn
cobalt-server-versioned
Cobalt server URLs must include /api/v2.
$.servers[?(@.url && @.url.indexOf('gocobalt.io') > -1)].url
error
cobalt-apikey-security
An apiKey security scheme must be defined.
$.components.securitySchemes
warn
cobalt-public-path-prefix
All Cobalt API paths should live under /public.
$.paths
warn
cobalt-operation-tags
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
warn
cobalt-operation-summary
Every operation must include a short summary.
$.paths[*][get,post,put,patch,delete]
error
cobalt-operation-id
Every operation must declare a unique operationId.
$.paths[*][get,post,put,patch,delete]
warn
cobalt-operation-id-camelcase
Operation IDs should be camelCase.
$.paths[*][get,post,put,patch,delete].operationId
warn
cobalt-error-responses
Mutating operations should declare 4xx error responses.
$.paths[*][post,put,patch,delete].responses
info
cobalt-pagination-page-limit
List endpoints should expose page/limit pagination.
$.paths[?(@property.match(/linked-account$|application$|execution$|records$/))].get.parameters[*].name