Golioth · API Governance Rules

Golioth API Rules

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

7 Rules warn 5
View Rules File View on GitHub

Rule Categories

golioth

Rules

warn
golioth-summary-title-case
Operation summaries must use Title Case
$.paths[*][get,post,put,patch,delete].summary
hint
golioth-summary-prefix
Operation summaries used in the API Evangelist catalog must begin with 'Golioth '
$.paths[*][get,post,put,patch,delete].summary
warn
golioth-security-scheme
Operations must reference the x-api-key security scheme
$.components.securitySchemes
warn
golioth-versioned-paths
Management API paths must be prefixed with /v1
$.paths[*]~
hint
golioth-project-scope
Project-scoped resources must include the {projectId} segment
$.paths[?(@property.startsWith('/v1/projects/'))]
warn
golioth-success-response
Every operation should declare a 200 or 201 response
$.paths[*][get,post,put,patch,delete].responses
warn
golioth-operation-tagged
Operations should have at least one tag
$.paths[*][get,post,put,patch,delete]

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas

rules:
  # Golioth uses Title Case for all operation summaries
  golioth-summary-title-case:
    description: Operation summaries must use Title Case
    message: "Summary '{{value}}' should use Title Case"
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].summary"
    then:
      function: pattern
      functionOptions:
        match: "^[A-Z]"

  # Golioth uses the "Golioth " prefix in catalog-canonical summaries
  golioth-summary-prefix:
    description: Operation summaries used in the API Evangelist catalog must begin with 'Golioth '
    message: "Summary '{{value}}' must begin with 'Golioth '"
    severity: hint
    given: "$.paths[*][get,post,put,patch,delete].summary"
    then:
      function: pattern
      functionOptions:
        match: "^Golioth "

  # Golioth uses an x-api-key header for project-scoped auth on the Management API
  golioth-security-scheme:
    description: Operations must reference the x-api-key security scheme
    severity: warn
    given: "$.components.securitySchemes"
    then:
      field: apiKey
      function: defined

  # All Management API paths must be versioned with /v1
  golioth-versioned-paths:
    description: Management API paths must be prefixed with /v1
    message: "Path '{{path}}' should start with /v1"
    severity: warn
    given: "$.paths[*]~"
    then:
      function: pattern
      functionOptions:
        match: "^/v1/"

  # Project-scoped resources must include {projectId} in the path
  golioth-project-scope:
    description: Project-scoped resources must include the {projectId} segment
    severity: hint
    given: "$.paths[?(@property.startsWith('/v1/projects/'))]"
    then:
      function: truthy

  # Every operation should declare a 200/201 response
  golioth-success-response:
    description: Every operation should declare a 200 or 201 response
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete].responses"
    then:
      function: schema
      functionOptions:
        schema:
          anyOf:
            - required: ['200']
            - required: ['201']
            - required: ['204']

  # Operations should declare at least one tag
  golioth-operation-tagged:
    description: Operations should have at least one tag
    severity: warn
    given: "$.paths[*][get,post,put,patch,delete]"
    then:
      field: tags
      function: defined

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/golioth-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.