airbnb · API Governance Rules
airbnb API Rules
Spectral linting rules defining API design standards and conventions for airbnb.
26 Rules
error 6
warn 20
Rule Categories
airbnb
no
operation
operationid
path
query
schema
security
servers
Rules
warn
airbnb-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete]
warn
airbnb-operation-id-camel-case
Operation IDs must use camelCase
$.paths[*][get,post,put,patch,delete]
error
airbnb-require-operation-tags
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
error
airbnb-require-response-200
GET operations must define a 200 response
$.paths[*].get
warn
airbnb-schema-title-required
All component schemas must have a title
$.components.schemas[*]
error
airbnb-require-oauth2-security
All operations must require OAuth2 security
$.paths[*][get,post,put,patch,delete]
warn
airbnb-listing-status-enum
Listing status must use defined enum values
$.components.schemas.Listing.properties.status
warn
airbnb-require-pagination-params
List operations should support pagination parameters
$.paths[*].get
error
airbnb-reservation-required-dates
Reservation schema must include check_in and check_out
$.components.schemas.Reservation.properties
error
airbnb-require-server-url
API must define at least one server URL
$
warn
airbnb-require-contact-info
API info must include contact information
$.info
warn
airbnb-no-inline-schemas-in-paths
Path responses should reference component schemas, not inline
$.paths[*][*].responses[*].content[*].schema
warn
airbnb-currency-field-present
Schemas with price fields should include currency
$.components.schemas[*].properties
warn
airbnb-require-description-on-paths
All operations must have a description
$.paths[*][get,post,put,patch,delete]
warn
airbnb-require-external-docs
API should include externalDocs pointing to developer portal
$
error
servers-https-only
Server URLs must use HTTPS.
$.servers[*].url
warn
servers-expected-domain
Server URLs should be on the airbnb.com domain.
$.servers[*].url
warn
path-params-casing
Path parameters should be snake_case (the dominant convention in this API).
$.paths[*].parameters[?(@.in=='path')].name
warn
query-params-casing
Query parameters should be snake_case (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].parameters[?(@.in=='query')]
warn
operationid-casing
Operation IDs should be camelCase (the dominant convention in this API).
$.paths[*][get,post,put,patch,delete].operationId
warn
schema-names-casing
Component schema names should be PascalCase (the dominant convention in this API).
$.components.schemas
warn
schema-properties-casing
Schema properties should be snake_case (the dominant convention in this API).
$.components.schemas[*].properties
warn
security-schemes-defined
Security schemes should be defined in components.
$.components
warn
operation-documents-401
Operations should document a 401 response (documented on 100% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
operation-documents-404
Operations should document a 404 response (documented on 82% of this API's operations).
$.paths[*][get,post,put,patch,delete].responses
warn
no-empty-descriptions
Descriptions must not be empty strings.
$..description