Parseflow · API Governance Rules

Parseflow API Rules

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

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

Rule Categories

parseflow

Rules

error
parseflow-uses-api-key-auth
Every Parseflow OpenAPI must declare the X-API-Key apiKey security scheme.
$.components.securitySchemes
error
parseflow-global-security-applied
Root-level `security` must reference ApiKeyAuth.
$.security
warn
parseflow-paths-versioned
All new (non-legacy, non-health, non-billing) operations must live under /v2.
$.paths[?(@property != '/health' && @property != '/process' && @property != '/pack')]~
warn
parseflow-summary-title-case
Operation summaries must be Title Case.
$.paths.*[get,post,put,patch,delete].summary
error
parseflow-summary-required
Every operation must declare a `summary`.
$.paths.*[get,post,put,patch,delete]
error
parseflow-operation-id-required
Every operation must declare an `operationId`.
$.paths.*[get,post,put,patch,delete]
warn
parseflow-byok-headers-optional
X-BYOK-Key, when present, must be an optional header parameter.
$.paths.*[get,post,put,patch,delete].parameters[?(@.name == 'X-BYOK-Key')]

Spectral Ruleset

Raw ↑
extends:
  - spectral:oas

functions: []

rules:
  # --- Provider-required auth ---
  parseflow-uses-api-key-auth:
    description: "Every Parseflow OpenAPI must declare the X-API-Key apiKey security scheme."
    message: "Parseflow requires an `ApiKeyAuth` apiKey scheme named `X-API-Key` (in: header)."
    severity: error
    given: "$.components.securitySchemes"
    then:
      - field: ApiKeyAuth
        function: truthy
      - field: ApiKeyAuth.type
        function: pattern
        functionOptions:
          match: "^apiKey$"
      - field: ApiKeyAuth.in
        function: pattern
        functionOptions:
          match: "^header$"
      - field: ApiKeyAuth.name
        function: pattern
        functionOptions:
          match: "^X-API-Key$"

  parseflow-global-security-applied:
    description: "Root-level `security` must reference ApiKeyAuth."
    severity: error
    given: "$.security"
    then:
      function: schema
      functionOptions:
        schema:
          type: array
          minItems: 1
          contains:
            type: object
            required: [ApiKeyAuth]

  # --- Path discipline: v2 namespace ---
  parseflow-paths-versioned:
    description: "All new (non-legacy, non-health, non-billing) operations must live under /v2."
    message: "Path `{{path}}` must be prefixed with `/v2` (legacy `/process`, `/pack`, `/health` exempt)."
    severity: warn
    given: "$.paths[?(@property != '/health' && @property != '/process' && @property != '/pack')]~"
    then:
      function: pattern
      functionOptions:
        match: "^/v2(/|$)"

  # --- Summary style: Title Case ---
  parseflow-summary-title-case:
    description: "Operation summaries must be Title Case."
    message: "Summary `{{value}}` must use Title Case (capitalize each significant word)."
    severity: warn
    given: "$.paths.*[get,post,put,patch,delete].summary"
    then:
      function: pattern
      functionOptions:
        match: "^([A-Z][a-zA-Z0-9]*)(\\s+(?:[A-Z][a-zA-Z0-9]*|V\\d+|[A-Z]{2,}))*$"

  parseflow-summary-required:
    description: "Every operation must declare a `summary`."
    severity: error
    given: "$.paths.*[get,post,put,patch,delete]"
    then:
      field: summary
      function: truthy

  parseflow-operation-id-required:
    description: "Every operation must declare an `operationId`."
    severity: error
    given: "$.paths.*[get,post,put,patch,delete]"
    then:
      field: operationId
      function: truthy

  parseflow-byok-headers-optional:
    description: "X-BYOK-Key, when present, must be an optional header parameter."
    severity: warn
    given: "$.paths.*[get,post,put,patch,delete].parameters[?(@.name == 'X-BYOK-Key')]"
    then:
      field: required
      function: falsy

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/parseflow-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.