Docling · API Governance Rules

Docling API Rules

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

6 Rules error 1 warn 5
View Rules File View on GitHub

Rule Categories

docling

Rules

warn
docling-operation-summary-title-case
Operation summaries should use Title Case.
$.paths.*[get,post,put,patch,delete,options].summary
warn
docling-versioned-paths
API paths exposed by Docling Serve must be versioned under `/v1/`.
$.paths
warn
docling-operation-id-camel-case
operationId should be camelCase.
$.paths.*[get,post,put,patch,delete].operationId
error
docling-task-id-path-param
Endpoints under /v1/status/poll/ and /v1/result/ must declare a task_id path parameter.
$.paths[?(@property == '/v1/status/poll/{task_id}' || @property == '/v1/result/{task_id}')].*.parameters[?(@.in == 'path')].name
warn
docling-tag-defined
Every operation must carry a tag.
$.paths.*[get,post,put,patch,delete].tags
warn
docling-json-content-type
Sync conversion endpoints should advertise application/json responses.
$.paths[?(@property == '/v1/convert/source' || @property == '/v1/convert/file')].post.responses.200.content

Spectral Ruleset

Raw ↑
extends:
- spectral:oas
rules:
  docling-operation-summary-title-case:
    description: Operation summaries should use Title Case.
    message: '{{property}} summary should be Title Case'
    given: $.paths.*[get,post,put,patch,delete,options].summary
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: ^([A-Z][a-zA-Z0-9]*)(\s(A|An|And|At|But|By|For|In|Of|On|Or|The|To|Up|Via|With)|\s[A-Z][a-zA-Z0-9]*)*$
  docling-versioned-paths:
    description: API paths exposed by Docling Serve must be versioned under `/v1/`.
    message: '{{path}} should be prefixed with `/v1/`'
    given: $.paths
    severity: warn
    then:
      field: '@key'
      function: pattern
      functionOptions:
        match: ^/(v1/|health$|openapi.json$|docs$|ui$)
  docling-operation-id-camel-case:
    description: operationId should be camelCase.
    given: $.paths.*[get,post,put,patch,delete].operationId
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: ^[a-z][a-zA-Z0-9]*$
  docling-task-id-path-param:
    description: Endpoints under /v1/status/poll/ and /v1/result/ must declare a task_id path parameter.
    given: $.paths[?(@property == '/v1/status/poll/{task_id}' || @property == '/v1/result/{task_id}')].*.parameters[?(@.in == 'path')].name
    severity: error
    then:
      function: enumeration
      functionOptions:
        values:
        - task_id
  docling-tag-defined:
    description: Every operation must carry a tag.
    given: $.paths.*[get,post,put,patch,delete].tags
    severity: warn
    then:
      function: truthy
  docling-json-content-type:
    description: Sync conversion endpoints should advertise application/json responses.
    given: $.paths[?(@property == '/v1/convert/source' || @property == '/v1/convert/file')].post.responses.200.content
    severity: warn
    then:
      field: application/json
      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/docling-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.