Bitbucket · API Governance Rules
Bitbucket API Rules
Spectral linting rules defining API design standards and conventions for Bitbucket.
19 Rules
error 8
warn 9
info 2
Rule Categories
delete
get
info
operation
pagination
parameter
paths
response
schema
security
tag
Rules
error
info-title-required
Info object must have a title
$.info
error
info-description-required
Info object must have a description
$.info
error
info-version-required
Info object must have a version
$.info
warn
paths-kebab-case
Path segments should use kebab-case
$.paths
error
paths-no-trailing-slash
Paths must not have trailing slashes
$.paths
error
operation-summary-required
Operations must have a summary
$.paths[*][get,post,put,patch,delete]
warn
operation-description-required
Operations must have a description
$.paths[*][get,post,put,patch,delete]
error
operation-operationid-required
Operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
operation-tags-required
Operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
info
operation-summary-prefix
Operation summaries should start with Bitbucket
$.paths[*][get,post,put,patch,delete].summary
warn
parameter-description-required
Parameters must have descriptions
$.paths[*][get,post,put,patch,delete].parameters[*]
error
response-success-required
Operations must define a success response
$.paths[*][get,post,put,patch,delete].responses
warn
schema-type-required
Schemas should have a type defined
$.definitions[*]
warn
schema-property-snake-case
Schema properties should use snake_case
$.definitions[*].properties
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
delete-no-request-body
DELETE operations should not have a request body
$.paths[*].delete
info
pagination-use-page
Paginated endpoints should use page-based pagination
$.paths[*].get.parameters[?(@.name=='page')]
warn
tag-title-case
Tag names should use Title Case
$.tags[*].name