Your API changed. Your docs did not.
Documentation drift is the gap between what the docs say and what the API does. It opens one release at a time, whenever the docs are a separate thing someone has to remember to update.
# read https://api.yourcompany.com/openapi.json+ POST /pet/{petId}/uploadImage added~ GET /pet/findByStatus changed- DELETE /store/order/legacy removed# 3 changes published
Where it comes from
- Docs written by hand
- A wiki, a Markdown folder or a docs tool someone edits. The update is a separate task after the code ships, and it slips.
- A spec that is not the source
- The OpenAPI file exists but is exported once and pasted somewhere. The next release does not touch it.
- Nobody sees the difference
- Nothing compares the docs with the API, so the first person to notice is a developer whose request fails.
- No record of changes
- Even when the docs are fixed, readers who built against the old version cannot tell what moved.
The fix: make the spec the only source
- 1
Generate the spec from the code
Most frameworks can emit OpenAPI from routes and types (FastAPI, NestJS,springdoc,drf-spectacularand others). Then the spec changes when the code does. - 2
Publish it at a stable URL
Serve it from the API itself, likehttps://api.yourcompany.com/openapi.json, so the current version is always at the same address. - 3
Build the docs from that URL
Import the URL into Specway. Click Update now after a release, turn on Keep in sync and it reads the spec once a day, or call the sync on push URL from your deploy job. - 4
Publish what changed
Each sync lists added, changed and removed endpoints and adds them to the changelog on your docs site.
What this does not fix
If the spec itself is wrong, the docs will be wrong in the same way. Generating the spec from code is what closes that gap, and it is your build, not Specway, that does it.
Guides you write by hand can still drift. Keep them short and link to the reference for details.
Questions
What about third-party APIs I do not control?+
Import their public spec URL. Each sync shows what changed since the last one, which is a quick way to notice a vendor change before your integration breaks.
Can a sync run from CI?+
Yes. Sync on push gives each API a secret URL. Add `curl -fsS -X POST "$SPECWAY_SYNC_URL"` after the step that publishes your spec and the docs update on every deploy. [How it works](/features/auto-sync#sync-on-push).
Does Specway flag breaking changes?+
No. It lists added, changed and removed endpoints. Removed endpoints and removed parameters are the ones to read first.
See your docs in a minute
Paste the link to your OpenAPI file. Free for one API, no card needed.