Scalar · API Governance Rules

Scalar — scalar rules

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

2 Rules warn 2
View Rules File View on GitHub

Rule Categories

operation

Rules

warn
operation-description
Operations should have a description.
$.paths[*][get,put,post,delete,patch,options,head]
warn
operation-tags
Operations should have at least one tag.
$.paths[*][get,put,post,delete,patch,options,head]

Spectral Ruleset

Raw ↑
# harvested from https://github.com/scalar/scalar/blob/6d5c9b633e48259f9238bcb8be8f3b2631503647/packages/galaxy/galaxy.ruleset.yaml on 2026-10-09 — a Spectral ruleset published in the provider's own GitHub repository (scalar/scalar); found by GitHub code search, fetched verbatim
x-method: harvested
x-stamped: 2026-10-09
x-source-url: https://github.com/scalar/scalar/blob/6d5c9b633e48259f9238bcb8be8f3b2631503647/packages/galaxy/galaxy.ruleset.yaml
# Scalar ruleset for the Galaxy example document.
#
# Extends Spectral's built-in OpenAPI ruleset (spectral:oas) and layers on a few
# Scalar opinions. The custom rules are kept at "warn" so they surface issues
# without breaking the build; spectral:oas errors still fail the lint.
#
# Run it with:
#   pnpm --filter @scalar/galaxy lint
#
# Only the 3.1 document is linted. Spectral's spectral:oas ruleset does not
# understand OpenAPI 3.2 yet, so linting src/documents/3.2.yaml validates it
# against the 3.0 schema and reports false positives (for example, it rejects
# schema-level "examples", the QUERY method, `additionalOperations` and other
# 3.2-only constructs). The 3.2 document showcases the OpenAPI 3.2 feature set
# and its structure is asserted by tests/yaml.test.ts, so its content is already
# covered. Revisit once Spectral gains OpenAPI 3.2 support.
extends: spectral:oas
rules:
  # Every operation should carry a human-readable description, not just a summary.
  operation-description:
    description: Operations should have a description.
    given: $.paths[*][get,put,post,delete,patch,options,head]
    severity: warn
    then:
      field: description
      function: truthy
  # Every operation should be tagged so it groups nicely in the API reference.
  operation-tags:
    description: Operations should have at least one tag.
    given: $.paths[*][get,put,post,delete,patch,options,head]
    severity: warn
    then:
      field: tags
      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/scalar-scalar-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.