Breaking Bad · API Governance Rules
Breaking Bad API Rules
Spectral linting rules defining API design standards and conventions for Breaking Bad.
32 Rules
error 10
warn 13
info 9
Rule Categories
delete
get
info
openapi
operation
parameter
paths
response
schema
security
servers
tag
tags
Rules
warn
info-title-format
Title must begin with "Breaking Bad".
$.info.title
warn
info-description-required
Info description must be present and meaningful.
$.info
error
info-version-required
Info version must be present.
$.info
info
info-license-required
A license should be declared for community APIs.
$.info
error
openapi-version-3
Spec must be OpenAPI 3.x.
$.openapi
warn
servers-defined
At least one server must be defined.
$.servers
warn
servers-https-or-noted
Server URLs should use HTTPS.
$.servers[*].url
error
paths-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
warn
paths-kebab-case
Path segments should be kebab-case (lowercase, hyphen-separated).
$.paths[*]~
error
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Every operation must have a description.
$.paths[*][get,post,put,patch,delete]
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
info
operation-operationid-verb-prefix
operationId should start with a known verb (get, list, create, update, delete).
$.paths[*][get,post,put,patch,delete].operationId
info
operation-summary-title-case
Summary should use Title Case.
$.paths[*][get,post,put,patch,delete].summary
error
operation-tags-required
Every operation must have at least one tag.
$.paths[*][get,post,put,patch,delete]
info
operation-microcks-extension
Each operation should declare an x-microcks-operation extension.
$.paths[*][get,post,put,patch,delete]
warn
tags-global-defined
Global tags array must be defined.
$
warn
tag-title-case
Tag names should use Title Case.
$.tags[*].name
warn
tag-description-required
Each tag must have a description.
$.tags[*]
warn
parameter-description-required
Each parameter must have a description.
$.paths[*][*].parameters[*]
info
parameter-snake-case
Parameter names should be snake_case (matches upstream conventions).
$.paths[*][*].parameters[*].name
error
response-2xx-required
Every operation must declare a 2xx response.
$.paths[*][get,post,put,patch,delete].responses
info
response-rate-limit-documented
List endpoints should document a 429 response (the upstream enforced 10k/day).
$.paths[/characters,/quotes,/episodes,/deaths][get].responses
error
response-description-required
Every response must have a description.
$.paths[*][*].responses[*]
warn
schema-snake-case-properties
Schema property names should be snake_case (matches the upstream JSON contract).
$.components.schemas[*].properties[*]~
info
schema-property-description
Every schema property should have a description.
$.components.schemas[*].properties[*]
error
schema-property-type
Every schema property must declare a type or $ref.
$.components.schemas[*].properties[*]
info
security-not-required
Breaking Bad API was anonymous-access; security blocks are optional.
$
error
get-no-request-body
GET operations must not declare a requestBody.
$.paths[*].get
warn
delete-no-request-body
DELETE operations must not declare a requestBody.
$.paths[*].delete
info
info-deprecation-noted
Deprecated APIs must declare x-status and x-deprecation-note.
$.info