Twilio · API Governance Rules

Twilio — twilio oai rules

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

4 Rules error 3 warn 1
Published by Twilio Served by the provider at https://github.com/twilio/twilio-oai/blob/141f1201b55abcc16b3aa8089e71c4a927326975/spectral.yaml; the copy below was fetched from there.
View Rules File View on GitHub

Rule Categories

component operation pascal require

Rules

error
component-name-rule
$..components.schemas[*]~
error
pascal-case-name-rule
$.paths[*][get,post,put,delete,patch,options,head,trace].operationId
error
require-openapi-rule
$
warn
operation-id-length-rule
$.paths[*][get,post,put,delete,patch,options,head,trace].operationId

Spectral Ruleset

Raw ↑
# harvested from https://github.com/twilio/twilio-oai/blob/141f1201b55abcc16b3aa8089e71c4a927326975/spectral.yaml on 2026-10-09 — a Spectral ruleset published in the provider's own GitHub repository (twilio/twilio-oai); found by GitHub code search, fetched verbatim
x-method: harvested
x-stamped: 2026-10-09
x-source-url: https://github.com/twilio/twilio-oai/blob/141f1201b55abcc16b3aa8089e71c4a927326975/spectral.yaml
extends: spectral:oas
rules:
  no-$ref-siblings: false

  component-name-rule:
    severity: error
    recommended: true
    message: Semantic error - Component names can only contain the characters A-Z a-z 0-9 - . _
    given: $..components.schemas[*]~
    then:
      function: pattern
      functionOptions:
        match: "^[a-zA-Z0-9\\.\\-_]+$"

  pascal-case-name-rule:
    severity: error
    recommended: true
    message: OperationId should be PascalCased.
    type: style
    given: "$.paths[*][get,post,put,delete,patch,options,head,trace].operationId"
    then:
      function: casing
      functionOptions:
        type: pascal

  require-openapi-rule:
    severity: error
    message: openapi field must be present with a non empty value
    given: $
    then:
      field: openapi
      function: truthy

  operation-id-length-rule:
    severity: warn
    message: OperationID length should be between 4 and 50
    given: "$.paths[*][get,post,put,delete,patch,options,head,trace].operationId"
    then:
      function: length
      functionOptions:
        max: 50
        min: 4
    
  # Disable example checks
  oas3-valid-media-example: off
  oas3-valid-schema-example: off

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/twilio-twilio-oai-spectral-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.