Skip to content

Blog

How to keep ReadMe docs in sync with your code and OpenAPI spec

When you re-sync an OpenAPI file, ReadMe updates the spec-derived parts of each API page in place and leaves the Markdown you wrote alone. Your guides, recipes, and examples are that Markdown, so they need an update path of their own.

EkLine and ReadMe logos side by side.
Published on
Read time
9 min

"How do I keep ReadMe docs in sync with my code and my OpenAPI spec?" ReadMe handles half of that job. When you re-sync an OpenAPI file, ReadMe updates the spec-derived parts of each API page in place and leaves the Markdown you wrote alone. Your guides, recipes, and examples are that Markdown, so they need an update path of their own.

Follow one change: your API adds a new required request parameter. You run rdme openapi upload, and the reference page for that operation shows the parameter in an updated request panel. The getting-started guide and the recipe that call the same endpoint still show a request without it.

TL;DR

  • When you re-sync the spec, ReadMe updates the reference pages and keeps your hand-written Markdown exactly as you left it.
  • Use bi-directional sync or rdme for Markdown, never both, and keep every operationId stable.
  • Guides, recipes, and samples need a review step tied to code changes, which EkLine adds from GitHub or GitLab.
Diagram: a ReadMe API page split in two; the top half from the OpenAPI spec (parameters, request panel) updates on every re-sync, the hand-written bottom half (guide, recipe example) is kept as is and is the half EkLine keeps current

What ReadMe keeps current when you re-sync

Bi-directional sync connects your project to "a GitHub, GitLab, or Bitbucket repository so content stays in step whether you edit in ReadMe or in your repo," and "All content types sync, including guides, API reference pages, custom pages, recipes, and changelogs." The repository "must be empty" before you connect it, with "no commits or files," so it cannot be your existing API codebase. Your code and your docs end up in separate repositories.

rdme is "ReadMe's official command-line interface (CLI) and GitHub Action," and it "pushes one way, from your files to ReadMe, so edits made in the ReadMe editor don't flow back to your repository."

ReadMe matches pages on operationId and "updates the existing API Reference pages in place rather than creating a second set." "The parts of the page that come from the document, such as the summary, parameters, and request and response panels, update to match the new definition." The new required parameter appears on the reference page with no edit from you.

Where hand-written ReadMe pages drift

Test it on your own hub. Open the last merged pull request that added or changed a request parameter. Did anything flag the guide or recipe that calls that endpoint? Each native tool did its own job:

Native checkWhat it verifiesWhat it does not seeWhere EkLine fits
OpenAPI re-syncSpec-derived parts of each reference page, matched on operationIdYour hand-written Markdown, which it keeps as isAutomatic PR review assesses the API pull request and can start a guide edit
Bi-directional syncThe repository and the hub hold the same pagesWhether a recipe's request still matches the APIDocs Agent opens its pull request in that documentation repository
rdmeFiles in Git reach ReadMe, one wayWhether the files it pushes are still trueDocs Reviewer checks the Markdown in CI, without a ReadMe framework value

The same re-sync page says your Markdown "is kept through every kind of re-sync." That protects your writing, and it also means no ReadMe process updates it. Three places still hold the old request:

  • The getting-started guide that walks a reader through a first call.
  • The recipe for that endpoint.
  • Any prose or sample you added to the reference page itself, now sitting beside refreshed panels.

Third-party sync glue brings failure modes of its own. In May 2026, JohnRDOrazio found his project's old github-readme-sync action "no longer maintained" and filed "Replace broken ReadMe.io sync workflow with self-hosted docs (OntoKit pattern)." davidt99 reported that "Docs upload format are incompatible with bi-directional sync"; ReadMe closed it as not fixable. An operationId change is worse than a rename: to ReadMe, "a changed ID is a deleted endpoint plus a new one. The old page, its URL, and any edits made to it are removed."

Does the GitHub AI Writer close the gap?

For some teams, yes. ReadMe's GitHub AI Writer "Proposes documentation updates when pull requests change your codebase." When a pull request opens in a connected repository, it "analyzes the diff, identifies new endpoints that need documentation or setup steps that have changed, and drafts the update on a review branch in ReadMe." It is "Available on Pro plans and above." If your API code is on GitHub and the pull request holds everything the guide needs, it covers the example change.

Its docs describe only a GitHub integration, so GitLab code has no documented path. Its docs describe it reading the diff and describe no input from tickets, Slack threads, or specs. It starts when a pull request opens, so work that merged before you connected it waits for someone to notice.

When is ReadMe's tooling enough on its own? When the guide edit can ride in the same pull request as the code and that pull request carries every fact, as with Markdown kept beside the code and pushed by rdme. Bi-directional sync needs an empty repository when you connect it, so in practice the guides start in a repository of their own. Once facts sit there, or in a ticket, a Slack thread, or a spec, the same-PR rule leans on memory; commenters in an Ask HN thread on the topic rely on docs-first rules and nightly scripts.

A ReadMe sync checklist for this week

  • Pick one path for Markdown pages. ReadMe says "If your project has Bi-Directional Sync enabled, you don't need rdme," though you still need the CLI for OpenAPI files.
  • Check every synced branch's rules: "your Git provider can reject the commits ReadMe pushes to it" when protection rules or rulesets apply.
  • Name branches exactly after your ReadMe versions, as ReadMe requires, so the branch a change merges into is the version it updates.
  • Give every operation an explicit, stable operationId, because a generated ID changes with the path and takes the old page with it.
  • When the spec changes, search your guides, recipes, and reference-page prose for the changed operation before you close the release.

How EkLine plugs into a ReadMe setup

Part of the workflowWhere it sits
Your Markdown pagesThe GitHub or GitLab repository ReadMe syncs, or the repository your CI runs rdme from.
What EkLine watchesYour API code. The GitHub App separates Code Repositories from Documentation Repositories, and Docs Agent also reviews GitLab merge requests.
Where the Docs Agent pull request landsYour docs repository, on the branch for the ReadMe version it documents.
How the change reaches your hubReadMe's sync, or your rdme step, after your team merges.
CI checkDocs Reviewer checks the Markdown for style, consistency, links, and accuracy. Its framework support page lists no ReadMe value, so it works without ReadMe-specific component handling.
BitbucketDocs Reviewer only, as a Bitbucket Pipelines check.
What stays in ReadMeHosting, the editor, versions, and the reference generated from your spec.

An engineer opens a pull request in the API repository that adds the required parameter. Automatic PR review assesses its diff, title, and description once, when it opens. A high-confidence result starts a docs pull request editing existing pages such as the guide and the recipe; a medium result posts a suggestion comment. You merge it, ReadMe's sync or your rdme step carries the guide to the hub, and the reference updates from the spec. If the review stayed silent, the weekly Docs Drift Review audits the last 30 days of GitHub activity. When the parameter came from a ticket or spec, a Docs Agent session can combine that source with the pull request. Code Sample Review "Verifies that code samples in your docs are accurate and runnable."

Can one writer keep pace with a busy API? At Socure, an identity intelligence company, one technical writer merged 348 documentation updates in seven weeks with no added headcount. The case study does not say which docs platform Socure uses.

If you are weighing a self-hosted move, Potluck Docs, EkLine's open-source Astro and Starlight template, renders OpenAPI references with Scalar and a built-in client for sending real requests.

FAQ

No. ReadMe keeps hosting your hub, generating the reference from your spec, and running sync or rdme. EkLine covers the pages ReadMe leaves to you: it reads code changes as pull requests open, sweeps merged work on a schedule, and opens pull requests against your guides and recipes for review. For a side-by-side view, read EkLine vs ReadMe.

Use one for Markdown pages. Bi-directional sync fits a team that edits in both the ReadMe editor and Git, and it needs an empty repository, branch names that match versions, and branch rules that let ReadMe push. rdme fits a team that treats Git as the only source, because it pushes one way.

Partly. Docs Agent works with GitHub and GitLab, so it does not open pull requests in a Bitbucket repository. Docs Reviewer runs as a Bitbucket Pipelines check on your Markdown.

Some teams do. In the Ask HN thread, cyanydeez described "a for loop that runs nightly on any files updated the prior day," handing the Markdown file next to each changed file to local AI to revise. With bi-directional sync, guides start in their own repository, so a recipe has no file beside the API code to pair with. Each rewrite also needs checking, which rstagi called hard: "it's hard to fact-check everything all the time." EkLine starts from the API pull request and drafts guide edits as a pull request in the repository ReadMe syncs, where a person approves them.


Take the last pull request that added a parameter to your API, and bring it to the call. To see what Docs Agent would change in your ReadMe guides after your next spec update, book a demo. Docs Agent is available to all plans, with access granted on request.

Sources


Read more about

Blog

Cursor Agent SDK vs Claude Agent SDK: What's the Difference?

·15 min read

Both SDKs give you an agent loop with tools, hooks and sessions. For an agent that wakes on a pull request or an incident, they split the work differently. Compare who owns the trigger, runtime, state, approval and recovery, then trace one pull request through both.

Blog

How to Evaluate Agent Skills: Do They Actually Improve Results?

·15 min read

A skill that loads or demos well has not shown that agents integrate your product correctly. Run the same integration task with and without it, test activation separately, record cost, and decide whether to keep, revise, or remove it. Includes a worksheet.

Blog

MCP vs CLI for AI Agents: Do You Need Both?

·16 min read

You already ship a CLI. Add an MCP server when your customers' agents run in clients that can't run the CLI installed on their machines. A decision guide based on client reach, execution environment, and where your API enforces permissions, traced through one read-only Stripe task.

Blog

What Is NVIDIA OpenShell, and What Does It Add Beyond a Container?

·15 min read

NVIDIA OpenShell is a policy layer on top of Docker, Podman, Kubernetes, or a microVM. What it controls beyond a hardened container, which defaults and approvals widen an agent's access, and a checklist to run before you adopt it.

Blog

Context Engineering vs Prompt Engineering: How to Diagnose Agent Failures

·13 min read

Prompt engineering shapes the instructions. Context engineering manages everything an agent sees. A method to diagnose which context factor broke an API integration task, with a worksheet and four worked cases.

Blog

Why ChatGPT still recommends the API endpoint you removed

·14 min read

AI assistants keep recommending removed API endpoints because training data predates your release, and deleting the reference page removes the page most likely to tell an assistant the endpoint is gone. A removal playbook for spec, reference, llms.txt, changelog, samples, and help center, plus a check to see whether assistant answers changed.