Backblaze · API Governance Rules
Backblaze API Rules
Spectral linting rules defining API design standards and conventions for Backblaze.
31 Rules
error 12
warn 12
info 7
Rule Categories
components
get
info
no
openapi
operation
parameter
paths
post
request
response
schema
security
servers
tags
Rules
error
info-title-required
Info must have a title
$.info
warn
info-description-required
Info must have a description
$.info
error
info-version-required
Info must have a version
$.info
info
info-contact-required
Info should have contact information
$.info
error
openapi-version-3
Must use OpenAPI 3.0.x
$
error
servers-defined
Servers must be defined
$
error
servers-https-only
All server URLs must use HTTPS
$.servers[*].url
warn
paths-no-trailing-slash
Paths must not have trailing slashes
$.paths
warn
paths-b2-api-prefix
B2 Native API paths should use /b2api/v{version}/ prefix
$.paths
error
operation-summary-required
Every operation must have a summary
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-description-required
Every operation must have a description
$.paths[*][get,post,put,patch,delete,head,options]
error
operation-id-required
Every operation must have an operationId
$.paths[*][get,post,put,patch,delete,head,options]
warn
operation-id-camel-case
OperationIds should use camelCase
$.paths[*][get,post,put,patch,delete,head,options].operationId
warn
operation-tags-required
Every operation must have at least one tag
$.paths[*][get,post,put,patch,delete,head,options]
info
operation-summary-backblaze-prefix
Operation summaries should start with "Backblaze B2"
$.paths[*][get,post,put,patch,delete,head,options].summary
info
tags-global-defined
Global tags array should be defined
$
warn
parameter-description-required
All parameters must have descriptions
$.paths[*][get,post,put,patch,delete,head,options].parameters[*]
error
parameter-schema-required
All parameters must have a schema
$.paths[*][get,post,put,patch,delete,head,options].parameters[*]
info
request-body-description
Request bodies should have descriptions
$.paths[*][post,put,patch].requestBody
error
response-success-required
Every operation must have at least one 2xx response
$.paths[*][get,post,put,patch,delete]
error
response-description-required
Every response must have a description
$.paths[*][get,post,put,patch,delete].responses[*]
warn
response-401-defined
Operations with auth should define 401 response
$.paths[*][post,get]
warn
schema-type-defined
All schemas should have a type
$.components.schemas[*]
info
schema-title-defined
All component schemas should have a title
$.components.schemas[*]
info
schema-description-defined
All component schemas should have a description
$.components.schemas[*]
error
security-schemes-defined
Security schemes must be defined in components
$.components
warn
security-global-defined
Global security should be defined
$
error
get-no-request-body
GET operations must not have a request body
$.paths[*].get
warn
post-b2-operations-have-request-body
POST operations should have a request body
$.paths[*].post
warn
no-empty-descriptions
Descriptions must not be empty strings
$..description
info
components-schemas-present
Spec should define reusable schemas in components
$.components