Elastic · API Governance Rules

Elastic — apm server rules

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

6 Rules error 2 warn 3 info 1
Published by Elastic Served by the provider at https://github.com/elastic/apm-server/blob/c1dc5a1569eb2da398194bf64012c66387ddcae3/docs/spec/openapi/.spectral.yaml; the copy below was fetched from there.
View Rules File View on GitHub

Rule Categories

avoid internal operation simple

Rules

warn
avoid-problematic-words
Ban certain words from descriptions
$..*.description
info
operation-success-examples
Response code 200 should have at least one example.
$.paths[*].[*].responses.[200].content.[application/json]
error
internal-extension
Operations should not have x-internal extension.
$.paths[*].[get,put,post,delete,options,head,patch,trace]
error
operation-summary
Operations should have summaries.
$.paths[*].[get,put,post,delete,options,head,patch,trace]
warn
operation-summary-length
Operation summary should be between 5 and 45 characters
$.paths[*].[get,put,post,delete,options,head,patch,trace]
warn
simple-verbs-in-summary
Summaries should use common verbs.
$.paths[*][*].summary

Spectral Ruleset

Raw ↑
# harvested from https://github.com/elastic/apm-server/blob/c1dc5a1569eb2da398194bf64012c66387ddcae3/docs/spec/openapi/.spectral.yaml on 2026-10-09 — a Spectral ruleset published in the provider's own GitHub repository (elastic/apm-server); found by GitHub code search, fetched verbatim
x-method: harvested
x-stamped: 2026-10-09
x-source-url: https://github.com/elastic/apm-server/blob/c1dc5a1569eb2da398194bf64012c66387ddcae3/docs/spec/openapi/.spectral.yaml
extends: ["spectral:oas"]
rules:
# Built-in rules
  # Descriptions
  oas3-parameter-description: warn
  oas2-parameter-description: warn
  tag-description: info
  # Document info
  info-contact: info
  info-description: warn
  info-license: warn
  # Examples
  oas3-valid-media-example: false
  oas3-valid-schema-example: false
  oas2-valid-media-example: false
  # Operations 
  operation-operationId: false
  operation-operationId-unique: false
  operation-operationId-valid-in-url: false
  operation-tag-defined: warn
  operation-tags: warn
  # Responses
  operation-success-response: warn
  # Schema
  oas3-schema: error
  oas2-schema: error
  array-items: false
  # Tags
  openapi-tags: warn
  openapi-tags-alphabetical: info
  # Turn off some built-in rules
  operation-description: false
  operation-singular-tag: false
# Custom rules
  # Descriptions
  avoid-problematic-words:
    description: Ban certain words from descriptions
    message: "Use appropriate replacements for problematic terms"
    severity: warn
    given: "$..*.description"
    then:
      function: pattern
      functionOptions:
        notMatch: /(blacklist|whitelist|execute|kill)/i
  # Examples
  operation-success-examples:
    formats: ["oas3_1"]
    description: Response code 200 should have at least one example.
    message: "Each response body should have a realistic example. It must not contain any sensitive or confidential data."
    severity: info
    given: $.paths[*].[*].responses.[200].content.[application/json]
    then:
      field: examples
      function: defined
  # Extensions
  internal-extension:
    description: Operations should not have x-internal extension.
    message: "Do not publish x-internal operations"
    severity: error
    given: $.paths[*].[get,put,post,delete,options,head,patch,trace]
    then:
      field: x-internal
      function: undefined
  # Operations
  operation-summary:
    description: Operations should have summaries.
    message: "Each operation should have a summary"
    severity: error
    recommended: true
    given: $.paths[*].[get,put,post,delete,options,head,patch,trace]
    then:
      field: summary
      function: defined   
  operation-summary-length:
    description: Operation summary should be between 5 and 45 characters
    given: "$.paths[*].[get,put,post,delete,options,head,patch,trace]"
    then:
      field: summary
      function: length
      functionOptions:
        max: 45
        min: 5
    severity: warn
  simple-verbs-in-summary:
    given:
      - "$.paths[*][*].summary"
    then:
      function: pattern
      functionOptions:
        notMatch: "Retrieve|Return|List *"
    severity: warn
    description: Summaries should use common verbs.
    message: "Summaries should use common verbs like Get, Update, Delete whenever possible"
  # NOTE: This one hiccups on acronyms so perhaps too noisy
  # docs-operation-summary-sentence-case:
  #   description: Operation summary should be sentence cased
  #   given: "$.paths[*].[get,put,post,delete,options,head,patch,trace]"
  #   then:
  #     field: summary
  #     function: pattern
  #     functionOptions:
  #       match: /^[A-Z]+[^A-Z]+$/
  #   severity: warn

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/elastic-apm-server-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.