CI check should be able to tell you when DELETE /users/:id exists in your Express app but is missing from openapi.yaml. That’s the problem I built SpecSync to solve.
SpecSync statically reads Express route registrations in JavaScript and TypeScript and compares them with the paths and HTTP methods in your OpenAPI spec. In the repo’s sample, it catches an undocumented DELETE /users/{id} and points to the source line.
Sample feature: https://github.com/specsyncs/specsync-cli/tree/v0.1.1/tests/fixtures/scenarios/undocumented-route
To try v0.1.1 on your own project:
npx --yes @specsyncs/cli@0.1.1 check --openapi openapi.yaml --fail-on never
--fail-on never lets you inspect drift findings without failing the build on those findings. I’m looking for feedback from people with real Express routing setups, especially nested routers, dynamic paths, and APIs with a base path. What did it get wrong on your project? If you can share a small reproduction, I’d like to turn it into a test case.
Source code:
specsyncs
/
specsync-cli
Catch undocumented or outdated API routes before they ship. SpecSync compares your Express code with your OpenAPI spec without starting your server.
SpecSync
Zero-server-startup, zero-runtime-instrumentation static Express-to-OpenAPI drift detector.
The Problem
In modern Node.js backends, API drift is silent and inevitable:
- Backend developers add, rename, or deprecate Express routes in TypeScript or JavaScript.
- OpenAPI specification documents (
openapi.yamloropenapi.json) fall out of sync. - Client SDKs, API gateways, automated contract tests, and developer portals break in production.
Existing tools fail to solve this practically:
- Linters (e.g. Spectral) only lint the OpenAPI document itself; they cannot inspect your source code.
- Diff tools (e.g. oasdiff) compare two OpenAPI specs; they cannot detect drift against your Express implementation.
- Runtime validators (e.g. express-openapi-validator, tsoa) require spinning up the entire server, establishing database connections (MongoDB, PostgreSQL), configuring Redis, and executing live HTTP traffic.
- Code decorators (e.g. swagger-jsdoc) pollute application business logic with verbose, fragile JSDoc comments that drift just as easily.
SpecSync solves this by analyzing your TypeScript and JavaScript ASTs statically. It extracts your true…
Github Issue: https://github.com/specsyncs/specsync-cli/issues
Top comments (0)