Telefono · API Governance Rules

Telefono API Rules

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

11 Rules error 5 warn 4 info 2
View Rules File View on GitHub

Rule Categories

telefono

Rules

warn
telefono-operation-summary-title-case
All operation summaries must use Title Case
$.paths[*][*].summary
error
telefono-operation-must-have-operationid
All operations must have an operationId
$.paths[*][*]
warn
telefono-operationid-camelcase
Operation IDs must use camelCase
$.paths[*][*].operationId
info
telefono-operation-must-have-description
All operations should have a description
$.paths[*][*]
warn
telefono-operation-must-have-tag
All operations must have at least one tag
$.paths[*][*]
error
telefono-number-parameter-required
Validation and lookup endpoints must require the 'number' parameter
$.paths['/validate'].get.parameters[?(@.name == 'number')]
error
telefono-response-200-required
GET operations must define a 200 response
$.paths[*].get.responses
warn
telefono-400-error-response
All operations should define a 400 Bad Request response
$.paths[*][*].responses
info
telefono-schema-properties-have-description
All schema properties should have descriptions
$.components.schemas[*].properties[*]
error
telefono-api-key-security
API must define ApiKeyAuth security scheme
$.components.securitySchemes
error
telefono-servers-required
API must define servers
$

Spectral Ruleset

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

  telefono-operation-must-have-operationid:
    description: All operations must have an operationId
    severity: error
    given: "$.paths[*][*]"
    then:
      field: operationId
      function: truthy

  telefono-operationid-camelcase:
    description: Operation IDs must use camelCase
    severity: warn
    given: "$.paths[*][*].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]*$"

  telefono-operation-must-have-description:
    description: All operations should have a description
    severity: info
    given: "$.paths[*][*]"
    then:
      field: description
      function: truthy

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

  telefono-number-parameter-required:
    description: Validation and lookup endpoints must require the 'number' parameter
    severity: error
    given: "$.paths['/validate'].get.parameters[?(@.name == 'number')]"
    then:
      field: required
      function: truthy

  telefono-response-200-required:
    description: GET operations must define a 200 response
    severity: error
    given: "$.paths[*].get.responses"
    then:
      field: "200"
      function: truthy

  telefono-400-error-response:
    description: All operations should define a 400 Bad Request response
    severity: warn
    given: "$.paths[*][*].responses"
    then:
      field: "400"
      function: truthy

  telefono-schema-properties-have-description:
    description: All schema properties should have descriptions
    severity: info
    given: "$.components.schemas[*].properties[*]"
    then:
      field: description
      function: truthy

  telefono-api-key-security:
    description: API must define ApiKeyAuth security scheme
    severity: error
    given: "$.components.securitySchemes"
    then:
      field: ApiKeyAuth
      function: truthy

  telefono-servers-required:
    description: API must define servers
    severity: error
    given: "$"
    then:
      field: servers
      function: truthy

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/telefono-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.