Consul Connect · API Governance Rules

Consul Connect API Rules

Spectral linting rules defining API design standards and conventions for Consul Connect.

6 Rules error 3 warn 3
View Rules File View on GitHub

Rule Categories

consul

Rules

error
consul-connect-info-title
Connect OpenAPI info.title must reference Consul Connect
$.info.title
error
consul-connect-server-defined
At least one server URL must be defined
$.servers
warn
consul-connect-v1-prefix
All paths should sit under the /v1 prefix at the server URL level
$.servers[*].url
warn
consul-connect-tag-required
Connect operations must be tagged with Intentions or CA
$.paths.*[get,put,post,delete,patch].tags[*]
error
consul-connect-operation-id-camelcase
Every operation must define an operationId using camelCase
$.paths.*[get,put,post,delete,patch].operationId
warn
consul-connect-token-security
A ConsulToken security scheme should be declared
$.components.securitySchemes

Spectral Ruleset

Raw ↑
extends:
  - "spectral:oas"
documentationUrl: https://developer.hashicorp.com/consul/api-docs/connect
rules:
  consul-connect-info-title:
    description: Connect OpenAPI info.title must reference Consul Connect
    severity: error
    given: "$.info.title"
    then:
      function: pattern
      functionOptions:
        match: "(?i)Consul\\s+Connect"
  consul-connect-server-defined:
    description: At least one server URL must be defined
    severity: error
    given: "$.servers"
    then:
      function: length
      functionOptions:
        min: 1
  consul-connect-v1-prefix:
    description: All paths should sit under the /v1 prefix at the server URL level
    severity: warn
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "/v1$"
  consul-connect-tag-required:
    description: Connect operations must be tagged with Intentions or CA
    severity: warn
    given: "$.paths.*[get,put,post,delete,patch].tags[*]"
    then:
      function: enumeration
      functionOptions:
        values:
          - Intentions
          - CA
  consul-connect-operation-id-camelcase:
    description: Every operation must define an operationId using camelCase
    severity: error
    given: "$.paths.*[get,put,post,delete,patch].operationId"
    then:
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"
  consul-connect-token-security:
    description: A ConsulToken security scheme should be declared
    severity: warn
    given: "$.components.securitySchemes"
    then:
      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/consul-connect-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.