Convex · API Governance Rules

Convex API Rules

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

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

Rule Categories

convex

Rules

error
convex-http-info-title
HTTP API OpenAPI info.title must reference Convex HTTP API
$.info.title
error
convex-http-server-defined
At least one server URL must be defined for the deployment
$.servers
warn
convex-http-server-pattern
HTTP API server URLs must match the convex.cloud deployment pattern
$.servers[*].url
warn
convex-http-tag-required
Tags must declare Queries, Mutations, Actions, or Functions scope
$.tags[*].name
error
convex-http-operation-id-camelcase
Every operation must define an operationId using camelCase
$.paths.*[get,put,post,delete,patch].operationId
error
convex-http-paths-prefix
HTTP API paths must live under /api
$.paths
warn
convex-http-post-only
Function execution endpoints must be POST
$.paths[?(@property =~ /^\/api\/(query|mutation|action|run)/)]

Spectral Ruleset

Raw ↑
extends:
  - "spectral:oas"
documentationUrl: https://docs.convex.dev/http-api/
rules:
  convex-http-info-title:
    description: HTTP API OpenAPI info.title must reference Convex HTTP API
    severity: error
    given: "$.info.title"
    then:
      function: pattern
      functionOptions:
        match: "(?i)Convex\\s+HTTP"
  convex-http-server-defined:
    description: At least one server URL must be defined for the deployment
    severity: error
    given: "$.servers"
    then:
      function: length
      functionOptions:
        min: 1
  convex-http-server-pattern:
    description: HTTP API server URLs must match the convex.cloud deployment pattern
    severity: warn
    given: "$.servers[*].url"
    then:
      function: pattern
      functionOptions:
        match: "convex\\.cloud"
  convex-http-tag-required:
    description: Tags must declare Queries, Mutations, Actions, or Functions scope
    severity: warn
    given: "$.tags[*].name"
    then:
      function: enumeration
      functionOptions:
        values:
          - Queries
          - Mutations
          - Actions
          - Functions
  convex-http-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]+$"
  convex-http-paths-prefix:
    description: HTTP API paths must live under /api
    severity: error
    given: "$.paths"
    then:
      field: "@key"
      function: pattern
      functionOptions:
        match: "^/api/"
  convex-http-post-only:
    description: Function execution endpoints must be POST
    severity: warn
    given: "$.paths[?(@property =~ /^\\/api\\/(query|mutation|action|run)/)]"
    then:
      function: defined
      field: post

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/convex-http-api-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.