Encore · API Governance Rules

Encore API Rules

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

7 Rules error 4 warn 2 info 1
View Rules File View on GitHub

Rule Categories

encore

Rules

error
encore-info-title
Encore API specs should set info.title.
$.info
error
encore-info-version
Encore API specs should set info.version reflecting the framework or platform version.
$.info
error
encore-operation-operation-id
Every operation must have a camelCase operationId.
$.paths.*.[get,put,post,delete,patch,options,head]
error
encore-operation-summary
Every operation must have a Title Case summary.
$.paths.*.[get,put,post,delete,patch,options,head]
warn
encore-operation-description
Every operation must have a description.
$.paths.*.[get,put,post,delete,patch,options,head]
info
encore-canonical-error-codes
Encore error responses should include a `code` field carrying a canonical error code (invalid_argument, unauthenticated, permission_denied, not_found, already_exists, internal, unavailable).
$.components.schemas.Error
warn
encore-path-lower-kebab
Paths should use lowercase kebab-case segments.
$.paths.*~

Spectral Ruleset

Raw ↑
extends:
- spectral:oas
rules:
  encore-info-title:
    description: Encore API specs should set info.title.
    severity: error
    given: $.info
    then:
      field: title
      function: truthy
  encore-info-version:
    description: Encore API specs should set info.version reflecting the framework or platform version.
    severity: error
    given: $.info
    then:
      field: version
      function: truthy
  encore-operation-operation-id:
    description: Every operation must have a camelCase operationId.
    severity: error
    given: $.paths.*.[get,put,post,delete,patch,options,head]
    then:
      field: operationId
      function: pattern
      functionOptions:
        match: '^[a-z][a-zA-Z0-9]+$'
  encore-operation-summary:
    description: Every operation must have a Title Case summary.
    severity: error
    given: $.paths.*.[get,put,post,delete,patch,options,head]
    then:
      field: summary
      function: pattern
      functionOptions:
        match: '^([A-Z][a-zA-Z0-9]*)(\s[A-Z][a-zA-Z0-9]*)*$'
  encore-operation-description:
    description: Every operation must have a description.
    severity: warn
    given: $.paths.*.[get,put,post,delete,patch,options,head]
    then:
      field: description
      function: truthy
  encore-canonical-error-codes:
    description: Encore error responses should include a `code` field carrying a canonical error code (invalid_argument, unauthenticated, permission_denied, not_found, already_exists, internal, unavailable).
    severity: info
    given: $.components.schemas.Error
    then:
      field: properties.code
      function: truthy
  encore-path-lower-kebab:
    description: Paths should use lowercase kebab-case segments.
    severity: warn
    given: $.paths.*~
    then:
      function: pattern
      functionOptions:
        match: '^[/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/encore-dev-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.