Migrating from Optic to DocSemantic
Optic is no longer maintained, but your contract coverage doesn't have to lapse. DocSemantic reads the same files, keeps the same CI gate, and takes about ten minutes to set up. Here's the whole process.
1. Gather what you already have
Everything Optic used still applies. Find your optic.yml (usually at the repo root) and any OpenAPI/Swagger documents it referenced. You don't need to convert or rewrite anything — DocSemantic reads these formats directly.
No spec on hand? That's fine too — DocSemantic can learn your contract from live traffic, so you can skip straight to sending samples.
2. Import into DocSemantic
Sign up, then open Import from Optic and paste your optic.yml. We discover the specs it points to and register each API as a contract. Prefer the terminal? The CLI does the same thing:
# 1. Get the CLI (zero-dependency, not on npm yet — run it from a clone)
git clone https://github.com/LingodocApi/docsemantic.git
cd docsemantic
alias docsemantic="node $PWD/cli/bin/docsemantic.js"
# 2. Point it at your workspace (grab a key from Settings → API keys)
docsemantic init --url "$DOCSEMANTIC_URL" --key "$DOCSEMANTIC_KEY"
# 3. Verify it can see your contract
docsemantic report3. Swap your CI gate
This is the only change to your pipeline. Replace the Optic diff step with docsemantic check. It exits non-zero when a breaking change is detected, so it blocks PRs exactly like Optic did — no other workflow changes needed.
Before
# .github/workflows/api.yml — BEFORE (Optic)
name: API checks
on: [push, pull_request]
jobs:
optic:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npx @useoptic/optic diff --check # ← no longer maintainedAfter
# .github/workflows/api-drift.yml — AFTER (DocSemantic)
name: API drift
on: [push, pull_request]
jobs:
drift:
runs-on: ubuntu-latest
steps:
# exits non-zero when drift is detected → fails the job, same as before
- uses: LingodocApi/docsemantic/github-action@main
with:
api-key: ${{ secrets.DOCSEMANTIC_KEY }}4. Turn on what Optic couldn't do
Once your contracts are in, you get the parts Optic never had — all optional, all off by default:
- Plain-English AI explanations of every drift, so reviewers understand the impact without reading a diff.
- Auto-fix pull requests that update the spec (or flag the code) when drift is intentional.
- Consumer tracking that names which frontend or service actually breaks — not just that something changed.
- Continuous production monitoring, so drift is caught from real traffic, not only in CI.
Common questions
- Do I have to rewrite my optic.yml or specs?
- No. DocSemantic reads optic.yml and OpenAPI/Swagger documents as-is. Paste them in and each API is registered as a contract.
- Will my CI behave the same way?
- Yes.
docsemantic checkexits non-zero on a breaking change, so it fails PRs the same way Optic's diff check did. Swapping the one step is the whole migration. - What does it cost to move over?
- Nothing to start. The free tier is forever-free for a single developer with no card required, so you can migrate and validate before deciding on a paid plan. See pricing.
- What if I never had a spec — only Optic capturing traffic?
- You're covered. DocSemantic learns the contract from live samples, so send traffic from the CLI or your app and it builds the contract for you. No spec required.
Ready to move your drift checks over?
Free for solo developers, no card required. Import your specs and keep shipping.