Skip to content

Rimfe for API and SDK teams

API and SDK teams ship contracts other people build on, so a wrong page breaks someone else's integration. Rimfe compares your OpenAPI spec before and after each pull request, checks every page that names a changed operation, flags SDK samples that call renamed code, and can block the merge until the docs match.

Updated

The problem

  • The spec and the handler change in one pull request, and the guide that explains the endpoint keeps the old field name.
  • Your reference is generated, so it looks current, while the hand-written pages on authentication, errors and pagination quietly go stale.
  • An SDK method gains a required parameter and the quickstart sample stops working for anyone who copies it.
  • You find out from a customer ticket, weeks after the release.

A week, before and after

MomentWithout RimfeWith Rimfe
Pull request opensReviewers read the handler and the spec. Nobody opens the guides.The Rimfe check lists each changed operation and the pages that now disagree with it, with quotes from both.
Code reviewSomeone remembers the migration page, or does not.A review rule asks for the migration page, and a missing entry is a finding.
MergeThe change ships. The docs ship later, if anyone notices.In blocking mode the merge waits for the docs, or for a maintainer to dismiss the finding with a reason.
After releaseA customer reports the wrong field name.The fix went out with the code, in the same pull request or a docs pull request beside it.

What Rimfe checks for API teams

  • OpenAPI 3.x and Swagger 2 specs are compared structurally. Each added, removed or renamed path, parameter, response field, enum value, default or required flag is checked on its own.
  • An operation the pull request adds with no page is Missing docs. One it removes that a page still describes is a Docs conflict.
  • With one generated page per operation, such as Mintlify openapi: front matter, a missing operation names the page to add.
  • Code samples in the docs are matched against renamed or removed functions, CLI flags, env vars, routes and config keys. Rimfe never runs your code.
  • Names your code marks deprecated need a notice in the docs that mention them.
  • GraphQL, Protobuf, AsyncAPI and JSON Schema files are reviewed from their diff.

Settings to turn on

SettingWhereWhy
Code mappingscodeMappings in .rimfe.jsonA change to the spec or the SDK source is always checked against those reference folders.
Review rulesSettings, Advanced, or rulesUp to 10 plain-language requirements, such as a migration entry for breaking changes.
Ignore docs pathsdocsIgnorePathsLeave out committed generated reference pages, so fixes go to the hand-written ones.
Docs coveragesurface, coverageFloor, coverageMaxDropCount documented operations and tracked names. Floor and drop limits need Business.
GitHub checkRepository settingsBlocking when docs required, with Rimfe as a required status check.

Worked example

In acme/backend-api, pull request #42 makes the Idempotency-Key header required on POST /invoices and renames createInvoice to invoices.create in the SDK. With the file below, Rimfe reports three findings: docs/reference/invoices.md still marks the header optional, the quickstart sample in docs/sdk/quickstart.md calls createInvoice, and docs/migration.md has no entry, which breaks rule 1. The suggested patch edits all three pages. A reviewer comments @rimfe open docs PR and merges it with the code.

.rimfe.json
{  "$schema": "https://rimfe.com/schema/rimfe.json",  "docsGlobs": ["docs/**/*.{md,mdx}"],  "codeMappings": [    { "source": "openapi.yaml", "target": "docs/reference/" },    { "source": "sdk/src/**", "target": "docs/sdk/" }  ],  "rules": [    "Breaking API changes must be listed in docs/migration.md",    "Public SDK methods need an example in docs/sdk/"  ],  "surface": ["ACME_API_KEY", "--base-url"],  "coverageMaxDrop": 2}

What Rimfe does not solve

  • Behavior that lives outside the spec and the code, such as a rate limit set in a gateway, is invisible to it.
  • Rendered references that exist only after your docs build are not in the repository, so they are not compared.
  • A spec split across files is compared one file at a time. External references are not followed.
  • It is not a spec linter. Keep your linter in CI.

Try it on your next pull request.

Free for public repositories, with unlimited members.

Start free with GitHub