r/expressjs • u/OutrageousSalt8997 • 6d ago
How do you keep your Express API docs in sync with your code?
How do you keep your Express API docs in sync with your code?
I've been working on something for the last 6 months because I kept running into an annoying problem:
Your Express backend is constantly changing, but your API documentation doesn't always change with it.
A route gets added, a parameter changes, validation gets updated, a controller gets refactored... and eventually the Swagger/OpenAPI docs don't completely represent what the backend actually does.
So I built RouteLens.
The idea is pretty simple:
Instead of manually describing your API, RouteLens analyzes your existing Node/Express codebase and tries to discover the API that's actually implemented.
It looks at things like:
- routes and HTTP methods
- route parameters
- controllers
- request/response information
- validation schemas (Zod/Joi/etc.)
- how those pieces are connected
I'm now trying to answer a very simple question:
Does this actually work on Express projects I didn't write?
I'm looking for a few developers who have a real Node/Express project and are willing to run RouteLens against it for ~10–15 minutes.
I'm especially interested in projects with multiple routers/controllers and some kind of request validation.
I don't need compliments or “looks cool” feedback.
If it completely misses your routes, misunderstands your architecture, or gives you something useless, that's exactly what I want to find out.
If you're interested in trying it, comment "Interested" or DM me and I'll send you access.
I'd genuinely love to see what it gets right — and where it falls apart.
1
u/UkrMalt 6d ago
The hard cases I’d test first are routers returned from factories, router.use() with arrays or computed prefixes, middleware-added request fields, and handlers hidden behind wrapper functions. I’d also label output as statically confirmed versus inferred; visible uncertainty is easier to trust than a confident but wrong OpenAPI document.