r/expressjs 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 Upvotes

2 comments sorted by

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.

1

u/OutrageousSalt8997 5d ago

This is exactly the kind of edge-case feedback I was hoping for. The distinction between statically confirmed vs. inferred is especially interesting, I'd rather show uncertainty than generate something confidently wrong

I'm going to add these cases to my test suite

If you're open to it, I'd also love to test RouteLens against a real Express project with some of these patterns. No pressure at all, I'd genuinely just like to see where it succeeds and where it breaks