Sabre · API Governance Rules

Sabre API Rules

Spectral linting rules defining API design standards and conventions for Sabre.

9 Rules error 1 warn 4 info 4
View Rules File View on GitHub

Rule Categories

sabre

Rules

warn
sabre-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
warn
sabre-bearer-auth-required
All endpoints except authentication must require BearerAuth
$.paths[*][*]
warn
sabre-operation-ids-camel-case
Operation IDs must use camelCase
$.paths[*][*].operationId
info
sabre-ota-schema-names
OTA request/response schemas should use OTA naming convention
$.components.schemas
warn
sabre-tags-required
All operations must have at least one tag
$.paths[*][*]
info
sabre-versioned-paths
Sabre API paths should include version prefix
$.paths
info
sabre-rate-limit-response
Operations should define 429 rate limit response
$.paths[*][get,post].responses
info
sabre-error-response-structure
Error responses should use standard Sabre error format
$.paths[*][*].responses[4*,5*].content[*].schema
error
sabre-post-request-body-required
POST operations must define a request body
$.paths[*][post]

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:
  sabre-operation-summary-title-case:
    description: All operation summaries must use Title Case
    message: "Operation summary '{{value}}' must use Title Case"
    given: "$.paths[*][*].summary"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][a-z]*)( [A-Z][a-z0-9]*)*$"

  sabre-bearer-auth-required:
    description: All endpoints except authentication must require BearerAuth
    message: "Endpoint must declare BearerAuth security"
    given: "$.paths[*][*]"
    severity: warn
    then:
      field: security
      function: defined

  sabre-operation-ids-camel-case:
    description: Operation IDs must use camelCase
    message: "Operation ID '{{value}}' must use camelCase"
    given: "$.paths[*][*].operationId"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  sabre-ota-schema-names:
    description: OTA request/response schemas should use OTA naming convention
    message: "Sabre OTA schemas should follow OTA_* naming pattern"
    given: "$.components.schemas"
    severity: info
    then:
      function: defined

  sabre-tags-required:
    description: All operations must have at least one tag
    message: "Operation must have at least one tag"
    given: "$.paths[*][*]"
    severity: warn
    then:
      field: tags
      function: truthy

  sabre-versioned-paths:
    description: Sabre API paths should include version prefix
    message: "Sabre API paths should include version (e.g., /v4.0.0/)"
    given: "$.paths"
    severity: info
    then:
      function: pattern
      functionOptions:
        match: "^\\/v[0-9]"

  sabre-rate-limit-response:
    description: Operations should define 429 rate limit response
    message: "Operations should define 429 rate limit exceeded response"
    given: "$.paths[*][get,post].responses"
    severity: info
    then:
      field: "429"
      function: defined

  sabre-error-response-structure:
    description: Error responses should use standard Sabre error format
    message: "Error responses should use standard Sabre ErrorResponse schema"
    given: "$.paths[*][*].responses[4*,5*].content[*].schema"
    severity: info
    then:
      function: defined

  sabre-post-request-body-required:
    description: POST operations must define a request body
    message: "POST operations must include a requestBody"
    given: "$.paths[*][post]"
    severity: error
    then:
      field: requestBody
      function: defined

Work with this as data

Every ruleset here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/sabre-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

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.

A second provider on the same verified email joins the account you already have.