DocsCI for OpenAPI docs validation

OpenAPI Docs Validation in CI

Your OpenAPI spec and your documentation drift apart with every release. DocsCI diffs them on every PR — catching renamed parameters, removed endpoints, and schema mismatches before developers encounter them.

Per-field

Diff granularity

OpenAPI 3.x

Spec format

SARIF

Export format

Every PR

Check frequency

Your OpenAPI spec and your docs are never perfectly in sync

The spec gets updated first. Or the docs get updated first. Either way, drift accumulates. Parameter names change, response fields are added or removed, authentication schemes evolve — and the docs lag behind.

  • A field renamed in the spec still appears under the old name in documentation for weeks
  • Deprecated endpoints stay documented as 'current' — developers build on them and hit 410s
  • New required fields appear in the spec but not in documented request body examples
  • Response schema examples show fields that were removed in the last API version
  • No one notices until a developer files a support ticket or opens a GitHub issue

Continuous OpenAPI drift detection

DocsCI imports your OpenAPI spec (from a URL or file path) and compares it against every documented endpoint, parameter, and response schema in your Markdown, MDX, or RST docs. On every pull request, it reports what drifted — specific fields, line numbers, and AI-generated suggestions for how to fix the docs.

Everything you need

📄

Spec vs docs diff

For every documented API endpoint, DocsCI checks: does the spec agree? Mismatched paths, methods, params, and schemas are reported as findings with severity.

🔄

Continuous validation

Runs on every PR that touches docs or the spec file. Catches drift the moment it's introduced — not after it ships to users.

📝

Per-field accuracy

DocsCI validates field names, types, required/optional, enum values, and descriptions — not just endpoint existence. Granular accuracy at the field level.

🤖

AI-generated doc fixes

When a drift finding is reported, Claude generates the corrected docs snippet — ready to apply as a patch diff in your PR.

📊

SARIF export

Export findings as SARIF 2.1.0 for GitHub Code Scanning. Drift findings appear as code annotations in the GitHub UI alongside other CI checks.

⚙️

Zero-config import

Point at your spec with openapi.url in docsci.yml. Supports OpenAPI 3.x from a URL or a file path. Works with Swagger 2.0 via conversion.

How it works

1

Add your OpenAPI spec

Configure the spec URL or path in docsci.yml. DocsCI fetches it on every run.

# docsci.yml
openapi:
  url: https://api.example.com/openapi.json
  # or path: ./openapi.yaml
checks:
  drift: true
2

DocsCI diffs spec vs docs

DocsCI parses your documentation, extracts API references, and diffs against the spec. Every divergence is a finding.

3

Fix before merge

Drift findings appear as PR comments with exact line numbers and AI-suggested doc updates. Block the merge until docs match the spec.

Frequently asked questions

Which OpenAPI versions does DocsCI support?

DocsCI supports OpenAPI 3.0.x and 3.1.x natively. Swagger 2.0 specs are automatically converted during import.

How does DocsCI parse documented endpoints from Markdown?

DocsCI uses a combination of fenced code block parsing (for request/response examples) and heuristic Markdown parsing (for parameter tables, path descriptions). It recognizes common documentation patterns from Docusaurus, Mintlify, Nextra, and hand-written Markdown.

Can I configure which drift types are blocking vs advisory?

Yes. In docsci.yml, configure checks.drift_blocking: [renamed_field, removed_endpoint] to make specific drift types block the PR. Others are reported as warnings.

Does DocsCI validate request body schemas?

Yes. DocsCI extracts JSON request body examples from code blocks and validates them against the spec's requestBody schema. Missing required fields and type mismatches are reported.

Ready to stop shipping broken docs?

Join API and platform teams who use DocsCI to ship verified documentation.