Twilio · API Governance Rules

Twilio — sendgrid oai rules

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

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

Rule Categories

component examples headers operation operationId parameters requestBodies require responses schemas securitySchemes

Rules

error
require-openapi-rule
$
error
component-name-rule
$.components[schemas].*~
warn
operation-id-length-rule
$.paths.[*].operationId
error
operationId-should-be-pascal-case
operationIds should be PascalCase.
$.paths.[*].operationId
error
schemas-should-be-pascal-case
Schemas should be PascalCase.
$.components['schemas'].*~
error
responses-should-be-pascal-case
Responses should be PascalCase.
$.components['responses'].*~
error
parameters-should-be-pascal-case
Parameters should be PascalCase.
$.components['parameters'].*~
error
examples-should-be-pascal-case
Examples should be PascalCase.
$.components['examples'].*~
error
requestBodies-should-be-pascal-case
requestBodies should be PascalCase.
$.components['requestBodies'].*~
error
headers-should-be-pascal-case
Headers should be PascalCase.
$.components['headers'].*~
error
securitySchemes-should-be-pascal-case
Headers should be PascalCase.
$.components['securitySchemes'].*~

Spectral Ruleset

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

formats: ["oas3_1"]

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

  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\\.\\-_]+$"

  operation-id-length-rule:
    severity: warn
    message: operationID length should be between 4 and 50
    given: "$.paths.[*].operationId"
    then:
      function: length
      functionOptions:
        max: 85
        min: 4

  operationId-should-be-pascal-case:
    description: operationIds should be PascalCase.
    type: style
    given: "$.paths.[*].operationId"
    severity: error
    message: "{{property}} should be PascalCase"
    then:
      function: casing
      functionOptions:
        type: pascal

  schemas-should-be-pascal-case:
    description: Schemas should be PascalCase.
    type: style
    given: "$.components['schemas'].*~"
    severity: error
    message: "{{property}} should be PascalCase"
    then:
      function: casing
      functionOptions:
        type: pascal

  responses-should-be-pascal-case:
    description: Responses should be PascalCase.
    type: style
    given: "$.components['responses'].*~"
    severity: error
    message: "{{property}} should be PascalCase"
    then:
      function: casing
      functionOptions:
        type: pascal

  parameters-should-be-pascal-case:
    description: Parameters should be PascalCase.
    type: style
    given: "$.components['parameters'].*~"
    severity: error
    message: "{{property}} should be PascalCase"
    then:
      function: casing
      functionOptions:
        type: pascal

  examples-should-be-pascal-case:
    description: Examples should be PascalCase.
    type: style
    given: "$.components['examples'].*~"
    severity: error
    message: "{{property}} should be PascalCase"
    then:
      function: casing
      functionOptions:
        type: pascal

  requestBodies-should-be-pascal-case:
    description: requestBodies should be PascalCase.
    type: style
    given: "$.components['requestBodies'].*~"
    severity: error
    message: "{{property}} should be PascalCase"
    then:
      function: casing
      functionOptions:
        type: pascal

  headers-should-be-pascal-case:
    description: Headers should be PascalCase.
    type: style
    given: "$.components['headers'].*~"
    severity: error
    message: "{{property}} should be PascalCase"
    then:
      function: casing
      functionOptions:
        type: pascal

  securitySchemes-should-be-pascal-case:
    description: Headers should be PascalCase.
    type: style
    given: "$.components['securitySchemes'].*~"
    severity: error
    message: "{{property}} should be PascalCase"
    then:
      function: casing
      functionOptions:
        type: pascal

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-sendgrid-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.