Regal · API Governance Rules

Regal API Rules

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

7 Rules error 5 warn 2
View Rules File View on GitHub

Rule Categories

regal

Rules

error
regal-info-contact
All Regal OpenAPI specs must declare an info.contact block pointing to Regal Support.
$.info.contact
error
regal-server-https
Regal API servers must use HTTPS.
$.servers[*].url
error
regal-server-host
Regal servers must be one of api.regal.ai or events.regalvoice.com.
$.servers[*].url
error
regal-auth-api-key
Regal APIs use an Authorization-header API key.
$.components.securitySchemes
warn
regal-operation-summary-title-case
Operation summaries should use Title Case.
$.paths[*][*].summary
error
regal-operation-id-required
Every operation must declare an operationId.
$.paths[*][*]
warn
regal-rate-limit-response
Each operation should document a 429 response.
$.paths[*][*].responses

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas
rules:
  regal-info-contact:
    description: All Regal OpenAPI specs must declare an info.contact block pointing to Regal Support.
    given: $.info.contact
    severity: error
    then:
      - field: name
        function: truthy
      - field: email
        function: truthy
      - field: url
        function: truthy
  regal-server-https:
    description: Regal API servers must use HTTPS.
    given: $.servers[*].url
    severity: error
    then:
      function: pattern
      functionOptions:
        match: '^https://'
  regal-server-host:
    description: Regal servers must be one of api.regal.ai or events.regalvoice.com.
    given: $.servers[*].url
    severity: error
    then:
      function: pattern
      functionOptions:
        match: '^https://(api\.regal\.ai/v1|events\.regalvoice\.com)(/.*)?$'
  regal-auth-api-key:
    description: Regal APIs use an Authorization-header API key.
    given: $.components.securitySchemes
    severity: error
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          minProperties: 1
          additionalProperties:
            type: object
            properties:
              type:
                enum:
                  - apiKey
              in:
                enum:
                  - header
              name:
                enum:
                  - Authorization
            required:
              - type
              - in
              - name
  regal-operation-summary-title-case:
    description: Operation summaries should use Title Case.
    given: $.paths[*][*].summary
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: '^([A-Z][a-z0-9]*)([ /-][A-Z0-9][a-zA-Z0-9]*)*$'
  regal-operation-id-required:
    description: Every operation must declare an operationId.
    given: $.paths[*][*]
    severity: error
    then:
      field: operationId
      function: truthy
  regal-rate-limit-response:
    description: Each operation should document a 429 response.
    given: $.paths[*][*].responses
    severity: warn
    then:
      field: '429'
      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/regal-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.