# authorship: generated by API Evangelist tooling. Stamped 2026-08-18
# on the file's own generator header (roadmap#64). An unmarked file is
# NOT assumed to be ours -- absence of evidence was never stamped.
x-method: generated
# bitbucket — Spectral ruleset (strengthened)
# Plain Spectral. Existing hand-authored rules preserved; measured rules added
# from this provider's own OpenAPI conventions by strengthen_ruleset.py,
# then self-validated against the spec.
#
# Provenance:
# - path-params-casing: snake @ 99% (n=838)
# - query-params-casing: snake @ 93% (n=100)
# - operationid-casing: camel @ 100% (n=100)
# - pagination params observed: ['page']
# - merge: kept 19 existing, added 3 measured, upgraded 0
# - added: query-params-casing, operationid-casing, no-empty-descriptions
extends:
- spectral:oas
rules:
info-title-required:
description: Info object must have a title
given: $.info
severity: error
then:
field: title
function: truthy
info-description-required:
description: Info object must have a description
given: $.info
severity: error
then:
field: description
function: truthy
info-version-required:
description: Info object must have a version
given: $.info
severity: error
then:
field: version
function: truthy
paths-kebab-case:
description: Path segments should use kebab-case
given: $.paths
severity: warn
then:
field: '@key'
function: pattern
functionOptions:
match: ^(/[a-z0-9_-]+(/{[a-zA-Z_]+})?)*$
paths-no-trailing-slash:
description: Paths must not have trailing slashes
given: $.paths
severity: error
then:
field: '@key'
function: pattern
functionOptions:
notMatch: /$
operation-summary-required:
description: Operations must have a summary
given: $.paths[*][get,post,put,patch,delete]
severity: error
then:
field: summary
function: truthy
operation-description-required:
description: Operations must have a description
given: $.paths[*][get,post,put,patch,delete]
severity: warn
then:
field: description
function: truthy
operation-operationid-required:
description: Operations must have an operationId
given: $.paths[*][get,post,put,patch,delete]
severity: error
then:
field: operationId
function: truthy
operation-tags-required:
description: Operations must have at least one tag
given: $.paths[*][get,post,put,patch,delete]
severity: warn
then:
field: tags
function: truthy
operation-summary-prefix:
description: Operation summaries should start with Bitbucket
given: $.paths[*][get,post,put,patch,delete].summary
severity: info
then:
function: pattern
functionOptions:
match: '^Bitbucket '
parameter-description-required:
description: Parameters must have descriptions
given: $.paths[*][get,post,put,patch,delete].parameters[*]
severity: warn
then:
field: description
function: truthy
response-success-required:
description: Operations must define a success response
given: $.paths[*][get,post,put,patch,delete].responses
severity: error
then:
function: schema
functionOptions:
schema:
anyOf:
- required:
- '200'
- required:
- '201'
- required:
- '204'
schema-type-required:
description: Schemas should have a type defined
given: $.definitions[*]
severity: warn
then:
field: type
function: truthy
schema-property-snake-case:
description: Schema properties should use snake_case
given: $.definitions[*].properties
severity: warn
then:
field: '@key'
function: pattern
functionOptions:
match: ^[a-z][a-z0-9_]*$
security-global-defined:
description: Global security should be defined
given: $
severity: warn
then:
field: security
function: truthy
get-no-request-body:
description: GET operations must not have a request body
given: $.paths[*].get
severity: error
then:
field: requestBody
function: falsy
delete-no-request-body:
description: DELETE operations should not have a request body
given: $.paths[*].delete
severity: warn
then:
field: requestBody
function: falsy
pagination-use-page:
description: Paginated endpoints should use page-based pagination
given: $.paths[*].get.parameters[?(@.name=='page')]
severity: info
then:
field: name
function: truthy
tag-title-case:
description: Tag names should use Title Case
given: $.tags[*].name
severity: warn
then:
function: pattern
functionOptions:
match: ^[A-Z]
query-params-casing:
description: Query parameters should be snake_case (the dominant convention in this API).
severity: warn
given: $.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
then:
field: name
function: casing
functionOptions:
type: snake
operationid-casing:
description: Operation IDs should be camelCase (the dominant convention in this API).
severity: warn
given: $.paths[*][get,post,put,patch,delete].operationId
then:
function: pattern
functionOptions:
match: ^[a-z][A-Za-z0-9]*$
no-empty-descriptions:
description: Descriptions must not be empty strings.
severity: warn
given: $..description
then:
function: truthy
Discovery needs no key. Ratings and market analysis are Pro.
Get an API key
Free tier, no form to fill in. Signing in shares your email address with us — we
store it to create your key and to recognise you if you sign in with another
provider. See our Privacy Policy and
Terms.