Tempo · API Governance Rules

Tempo API Rules

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

9 Rules error 2 warn 6 info 1
View Rules File View on GitHub

Rule Categories

tempo

Rules

info
tempo-no-auth-required
Tempo HTTP API is an internal service API without authentication by design
$.paths[*][get,post,put,delete].security
error
tempo-operation-id-required
All operations must have an operationId
$.paths[*][get,post,put,patch,delete]
warn
tempo-operation-id-camel-case
OperationIds should use camelCase
$.paths[*][get,post,put,patch,delete].operationId
warn
tempo-summary-title-case
Operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete].summary
warn
tempo-operation-tags-required
All operations must have at least one tag
$.paths[*][get,post,put,patch,delete]
warn
tempo-operation-description-required
All operations must have a description
$.paths[*][get,post,put,patch,delete]
warn
tempo-traceid-pattern
traceID path parameters should enforce hex format
$.paths[*].parameters[?(@.name=='traceID')].schema
error
tempo-server-urls-required
API spec must define server URLs
$
warn
tempo-success-response-schema
Successful responses should include a schema
$.paths[*][get].responses.200.content.application/json

Spectral Ruleset

Raw ↑
extends: spectral:oas
rules:

  # Tempo API has no auth - all operations should be public (internal service)
  tempo-no-auth-required:
    description: Tempo HTTP API is an internal service API without authentication by design
    message: "Tempo API operations should not require authentication — it is an internal service"
    severity: info
    given: "$.paths[*][get,post,put,delete].security"
    then:
      function: falsy

  # Enforce operation IDs
  tempo-operation-id-required:
    description: All operations must have an operationId
    message: "Operation is missing operationId"
    severity: error
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: operationId
      function: truthy

  # Enforce camelCase operation IDs
  tempo-operation-id-camel-case:
    description: OperationIds should use camelCase
    message: "operationId '{{value}}' should use camelCase"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"

  # Enforce Title Case summaries
  tempo-summary-title-case:
    description: Operation summaries must use Title Case
    message: "Summary '{{value}}' should use Title Case"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z][a-zA-Z0-9 ]+$"

  # Enforce tags
  tempo-operation-tags-required:
    description: All operations must have at least one tag
    message: "Operation is missing tags"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: tags
      function: truthy

  # Enforce descriptions
  tempo-operation-description-required:
    description: All operations must have a description
    message: "Operation is missing a description"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: description
      function: truthy

  # TraceID path parameters should have hex pattern validation
  tempo-traceid-pattern:
    description: traceID path parameters should enforce hex format
    message: "traceID parameter should have hex format pattern"
    severity: warn
    given: "$.paths[*].parameters[?(@.name=='traceID')].schema"
    then:
      field: pattern
      function: truthy

  # Server URLs required
  tempo-server-urls-required:
    description: API spec must define server URLs
    message: "API spec is missing server definitions"
    severity: error
    given: "$"
    then:
      field: servers
      function: truthy

  # 200 responses must have schemas
  tempo-success-response-schema:
    description: Successful responses should include a schema
    message: "200 response is missing a schema"
    severity: warn
    given: "$.paths[*][get].responses.200.content.application/json"
    then:
      field: schema
      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/tempo-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.