SPAN · API Governance Rules

SPAN API Rules

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

5 Rules error 1 warn 4
View Rules File View on GitHub

Rule Categories

span

Rules

warn
span-paths-versioned
All SPAN REST paths must begin with /api/v1/.
$.paths
warn
span-paths-kebab-case
SPAN path segments use kebab-case (lowercase with hyphens).
$.paths
error
span-bearer-security
SPAN OpenAPI must declare HTTPBearer security scheme.
$.components.securitySchemes
warn
span-operation-summary
SPAN operations must have a summary.
$.paths.*[get,post,put,delete,patch]
warn
span-json-only
SPAN responses are application/json.
$.paths.*[get,post,put,delete,patch].responses.*.content

Spectral Ruleset

Raw ↑
extends: [[spectral:oas, all]]
rules:
  # SPAN paths are versioned at /api/v1/
  span-paths-versioned:
    description: All SPAN REST paths must begin with /api/v1/.
    severity: warn
    given: "$.paths"
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/api/v1/"
  # SPAN uses kebab-case for path segments
  span-paths-kebab-case:
    description: SPAN path segments use kebab-case (lowercase with hyphens).
    severity: warn
    given: "$.paths"
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/api/v1(/[a-z0-9-]+|/\\{[a-zA-Z_]+\\})*$"
  # SPAN endpoints use HTTP Bearer JWT authentication
  span-bearer-security:
    description: SPAN OpenAPI must declare HTTPBearer security scheme.
    severity: error
    given: "$.components.securitySchemes"
    then:
      field: HTTPBearer
      function: truthy
  # Operations should be tagless-but-summarized
  span-operation-summary:
    description: SPAN operations must have a summary.
    severity: warn
    given: "$.paths.*[get,post,put,delete,patch]"
    then:
      field: summary
      function: truthy
  # JSON-only API
  span-json-only:
    description: SPAN responses are application/json.
    severity: warn
    given: "$.paths.*[get,post,put,delete,patch].responses.*.content"
    then:
      field: "application/json"
      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/span-io-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.