Modal · API Governance Rules

Modal API Rules

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

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

Rule Categories

modal

Rules

error
modal-info-title-set
Modal OpenAPI documents must have a descriptive title that mentions Modal.
$.info.title
error
modal-info-version-set
Modal OpenAPI documents must specify a version.
$.info
error
modal-servers-present
Modal OpenAPI documents must declare at least one server.
$.servers
warn
modal-operation-summary-title-case
Operation summaries should use Title Case.
$.paths..[?(@.summary)]
warn
modal-operation-id-camel-case
Operation IDs should be camelCase.
$.paths..[?(@.operationId)]
error
modal-bearer-security
Every Modal operation must require ModalToken bearer auth.
$.security
warn
modal-tag-defined
All operations must be tagged.
$.paths..[?(@.tags)]

Spectral Ruleset

Raw ↑
extends: spectral:oas
formats:
  - oas3_1
rules:
  modal-info-title-set:
    description: Modal OpenAPI documents must have a descriptive title that mentions Modal.
    given: $.info.title
    severity: error
    then:
      function: pattern
      functionOptions:
        match: "(?i)modal"
  modal-info-version-set:
    description: Modal OpenAPI documents must specify a version.
    given: $.info
    severity: error
    then:
      field: version
      function: truthy
  modal-servers-present:
    description: Modal OpenAPI documents must declare at least one server.
    given: $.servers
    severity: error
    then:
      function: length
      functionOptions:
        min: 1
  modal-operation-summary-title-case:
    description: Operation summaries should use Title Case.
    given: $.paths..[?(@.summary)]
    severity: warn
    then:
      field: summary
      function: pattern
      functionOptions:
        match: "^[A-Z]"
  modal-operation-id-camel-case:
    description: Operation IDs should be camelCase.
    given: $.paths..[?(@.operationId)]
    severity: warn
    then:
      field: operationId
      function: pattern
      functionOptions:
        match: "^[a-z][a-zA-Z0-9]+$"
  modal-bearer-security:
    description: Every Modal operation must require ModalToken bearer auth.
    given: $.security
    severity: error
    then:
      function: truthy
  modal-tag-defined:
    description: All operations must be tagged.
    given: $.paths..[?(@.tags)]
    severity: warn
    then:
      field: tags
      function: length
      functionOptions:
        min: 1

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/modal-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 email required.

A second provider on the same verified email joins the account you already have.