Booking Holdings · API Governance Rules
Booking Holdings API Rules
Spectral linting rules defining API design standards and conventions for Booking Holdings.
30 Rules
error 10
warn 13
info 7
Rule Categories
deprecation
global
info
no
openapi
operation
parameter
path
request
response
schema
security
server
servers
tag
Rules
error
info-title-required
API must declare an info.title.
$.info
warn
info-title-booking-prefix
Title should identify Booking.com.
$.info.title
warn
info-description-required
API must have a description (summary acceptable for 3.1).
$.info
error
info-version-required
API must declare a version.
$.info
warn
openapi-version-3-1
Booking.com Demand API specs are OpenAPI 3.1.0.
$.openapi
error
servers-defined
At least one server must be defined.
$.servers
error
server-https-only
All server URLs must use HTTPS.
$.servers[*].url
warn
server-description-required
Each server should describe its environment (e.g. Production, Sandbox).
$.servers[*]
warn
path-kebab-case
Path segments must be lowercase kebab-case.
$.paths[*]~
error
path-no-trailing-slash
Paths must not end with a trailing slash.
$.paths[*]~
error
path-no-query-string
Paths must not contain query strings.
$.paths[*]~
info
operation-post-only
Demand API endpoints are RPC-style POST operations; avoid GET/PUT/PATCH/DELETE.
$.paths[*]
warn
operation-summary-required
Every operation must have a summary.
$.paths[*][get,post,put,patch,delete]
warn
operation-summary-booking-prefix
Operation summaries should be prefixed with "Booking.com ".
$.paths[*][get,post,put,patch,delete].summary
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
warn
operation-tags-required
Every operation must declare at least one tag.
$.paths[*][get,post,put,patch,delete]
info
operation-microcks-extension
Operations should carry an x-microcks-operation extension for mock compatibility.
$.paths[*][get,post,put,patch,delete]
info
tag-title-case
Tag names should be Title Case (allowing a Common/Subgroup form).
$.paths[*][get,post,put,patch,delete].tags[*]
warn
parameter-description-required
Parameters must have a description.
$.paths[*][get,post,put,patch,delete].parameters[*]
info
parameter-snake-case
Parameter names should be snake_case.
$.paths[*][get,post,put,patch,delete].parameters[*].name
warn
request-body-json
Request bodies should accept application/json.
$.paths[*][post,put,patch].requestBody.content
error
response-2xx-required
Every operation must define a successful (2xx) response.
$.paths[*][get,post,put,patch,delete].responses
info
response-json-content
200 responses should return application/json.
$.paths[*][get,post,put,patch,delete].responses.200.content
info
schema-property-snake-case
Schema property names should be snake_case (Demand API convention).
$..properties.*~
error
global-security-defined
The API must declare global security.
$
error
security-scheme-bearer
A BearerAuth (HTTP bearer) security scheme must be defined.
$.components.securitySchemes
warn
security-scheme-is-bearer
BearerAuth must be an http bearer scheme.
$.components.securitySchemes.BearerAuth
warn
no-empty-descriptions
Descriptions, when present, must not be empty.
$..description
info
deprecation-documented
Deprecated operations should explain the deprecation in their description.
$.paths[*][get,post,put,patch,delete][?(@.deprecated == true)]