Vitess · API Governance Rules

Vitess API Rules

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

9 Rules error 2 warn 5
View Rules File View on GitHub

Rule Categories

vitess

Rules

error
vitess-operation-summary-required
$.paths[*][*]
warn
vitess-summary-title-case
$.paths[*][*].summary
warn
vitess-operationid-camelcase
$.paths[*][*].operationId
warn
vitess-operation-tags
$.paths[*][*]
error
vitess-get-200-response
$.paths[*].get.responses
hint
vitess-get-500-response
$.paths[*].get.responses
warn
vitess-path-params-described
$.paths[*][*].parameters[?(@.in=='path')]
hint
vitess-schema-descriptions
$.components.schemas[*]
warn
vitess-query-param-snake-case
$.paths[*][*].parameters[?(@.in=='query')].name

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas

rules:
  # All operations must have summaries
  vitess-operation-summary-required:
    message: "All VTAdmin API operations must have a summary"
    severity: error
    given: "$.paths[*][*]"
    then:
      field: summary
      function: truthy

  # Summaries must use Title Case
  vitess-summary-title-case:
    message: "Operation summaries must use Title Case"
    severity: warn
    given: "$.paths[*][*].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z]"

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

  # Operations must be tagged
  vitess-operation-tags:
    message: "All operations must have at least one tag"
    severity: warn
    given: "$.paths[*][*]"
    then:
      field: tags
      function: truthy

  # GET operations return 200
  vitess-get-200-response:
    message: "GET operations must document a 200 response"
    severity: error
    given: "$.paths[*].get.responses"
    then:
      field: "200"
      function: truthy

  # All GET operations must document 500 response
  vitess-get-500-response:
    message: "GET operations should document a 500 error response"
    severity: hint
    given: "$.paths[*].get.responses"
    then:
      field: "500"
      function: truthy

  # Path parameters must have descriptions
  vitess-path-params-described:
    message: "Path parameters must have descriptions"
    severity: warn
    given: "$.paths[*][*].parameters[?(@.in=='path')]"
    then:
      field: description
      function: truthy

  # Schemas must have descriptions
  vitess-schema-descriptions:
    message: "Component schemas must have descriptions"
    severity: hint
    given: "$.components.schemas[*]"
    then:
      field: description
      function: truthy

  # API must use snake_case for query parameters (Vitess convention)
  vitess-query-param-snake-case:
    message: "Query parameters must use snake_case (Vitess API convention)"
    severity: warn
    given: "$.paths[*][*].parameters[?(@.in=='query')].name"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-z0-9_]*$"

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/vitess-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 email required.

A second provider on the same verified email joins the account you already have.