StatsD · API Governance Rules

StatsD API Rules

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

7 Rules error 1 warn 4 info 2
View Rules File View on GitHub

Rule Categories

statsd

Rules

warn
statsd-summary-title-case
Every operation summary MUST be in Title Case.
$.paths[*][*].summary
error
statsd-operation-description-required
Every operation MUST have a description.
$.paths[*][get,post,put,delete,patch]
warn
statsd-operation-id-camel-case
operationId MUST be lowerCamelCase.
$.paths[*][*].operationId
warn
statsd-tag-defined-titlecase
All tags MUST be defined in the top-level `tags` array and use Title Case.
$.tags[*].name
info
statsd-admin-text-plain-responses
The StatsD admin interface returns plain-text payloads natively. Every 2xx response in the admin OpenAPI MUST advertise a `text/plain` media type (even when also exposing JSON-shaped schemas for parsed consumers).
$.paths[*][get,post].responses['200'].content
info
statsd-admin-default-port-documented
The admin TCP port SHOULD be exposed as a server variable with default 8126.
$.servers[*].variables.port
warn
statsd-no-trailing-slash
Paths MUST NOT end with a trailing slash.
$.paths

Spectral Ruleset

Raw ↑
extends:
- - spectral:oas
  - all
rules:
  statsd-summary-title-case:
    description: Every operation summary MUST be in Title Case.
    severity: warn
    given: $.paths[*][*].summary
    then:
      function: pattern
      functionOptions:
        match: '^(?:[A-Z][A-Za-z0-9]*)(?: [A-Z][A-Za-z0-9]*)*$'

  statsd-operation-description-required:
    description: Every operation MUST have a description.
    severity: error
    given: $.paths[*][get,post,put,delete,patch]
    then:
      field: description
      function: truthy

  statsd-operation-id-camel-case:
    description: operationId MUST be lowerCamelCase.
    severity: warn
    given: $.paths[*][*].operationId
    then:
      function: pattern
      functionOptions:
        match: '^[a-z][a-zA-Z0-9]*$'

  statsd-tag-defined-titlecase:
    description: All tags MUST be defined in the top-level `tags` array and use Title Case.
    severity: warn
    given: $.tags[*].name
    then:
      function: pattern
      functionOptions:
        match: '^(?:[A-Z][A-Za-z0-9]*)(?: [A-Z][A-Za-z0-9]*)*$'

  statsd-admin-text-plain-responses:
    description: >-
      The StatsD admin interface returns plain-text payloads natively. Every
      2xx response in the admin OpenAPI MUST advertise a `text/plain` media
      type (even when also exposing JSON-shaped schemas for parsed consumers).
    severity: info
    given: $.paths[*][get,post].responses['200'].content
    then:
      field: text/plain
      function: truthy

  statsd-admin-default-port-documented:
    description: The admin TCP port SHOULD be exposed as a server variable with default 8126.
    severity: info
    given: $.servers[*].variables.port
    then:
      field: default
      function: truthy

  statsd-no-trailing-slash:
    description: Paths MUST NOT end with a trailing slash.
    severity: warn
    given: $.paths
    then:
      function: pattern
      functionOptions:
        notMatch: '.+/$'
      field: '@key'

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/statsd-admin-interface-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.