Gladly · API Governance Rules

Gladly API Rules

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

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

Rule Categories

gladly operation

Rules

warn
operation-singular-tag
Each operation should belong to exactly one Gladly business surface tag.
$.paths[*][get,post,put,patch,delete]
warn
gladly-summary-title-case
Operation summary should use Title Case.
$.paths[*][get,post,put,patch,delete].summary
error
gladly-paths-no-trailing-slash
Gladly paths must not end with a trailing slash (other than the root).
$.paths
warn
gladly-security-required
Every operation should declare basic auth unless it is the public answer search.
$.paths[*][get,post,put,patch,delete]

Spectral Ruleset

Raw ↑
extends:
- spectral:oas
rules:
  # Operation hygiene
  operation-operationId: error
  operation-operationId-unique: error
  operation-operationId-valid-in-url: warn
  operation-summary: error
  operation-description: warn
  operation-tag-defined: error
  operation-tags: error
  operation-singular-tag:
    description: Each operation should belong to exactly one Gladly business surface tag.
    given: $.paths[*][get,post,put,patch,delete]
    severity: warn
    then:
      field: tags
      function: length
      functionOptions:
        max: 1
  # Summaries follow the project's Title Case convention
  gladly-summary-title-case:
    description: Operation summary should use Title Case.
    given: $.paths[*][get,post,put,patch,delete].summary
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: '^([A-Z0-9][\w''\-]*)(\s+(a|an|and|as|at|but|by|for|if|in|nor|of|on|or|so|the|to|up|yet|via|per|vs|[A-Z0-9][\w''\-]*))*$'
  # Tag governance
  openapi-tags: error
  openapi-tags-alphabetical: off
  # Schema and component governance
  no-$ref-siblings: error
  oas3-unused-component: warn
  oas3-valid-media-example: warn
  oas3-valid-schema-example: warn
  # Security
  oas3-server-not-example.com: error
  # Path style — Gladly mounts /api/v1 on the organization subdomain
  gladly-paths-no-trailing-slash:
    description: Gladly paths must not end with a trailing slash (other than the root).
    given: $.paths
    severity: error
    then:
      function: pattern
      field: '@key'
      functionOptions:
        notMatch: '.+/$'
  # Auth coverage — every op should require basic auth unless explicitly exempted
  gladly-security-required:
    description: Every operation should declare basic auth unless it is the public answer search.
    given: $.paths[*][get,post,put,patch,delete]
    severity: warn
    then:
      field: security
      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/gladly-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.