Comparison
Both tools read your Next.js route handlers and produce API documentation. They differ in what they ask of your code and what they emit: next-swagger-doc turns JSDoc annotations into an OpenAPI document; Docloom reads the handlers and their Zod schemas and emits a hosted markdown reference.
| Docloom | next-swagger-doc | |
|---|---|---|
| Input | Your route handlers and the Zod schemas they use, parsed with the TypeScript compiler. | JSDoc / annotation comments you add to each handler. |
| Output | A hosted markdown API reference: endpoints, request bodies, response shapes, query and header inputs. | An OpenAPI 3 document (JSON), typically rendered with Swagger UI or ReDoc. |
| Spec format | Not OpenAPI — a readable reference document for developers. | OpenAPI 3, usable by client generators, gateways, mock servers and existing Swagger tooling. |
| Descriptions | AI-written on top of the parsed structure; anything unprovable is marked “not documented in source”. | Whatever you wrote in the annotations. |
| Hosting | Published to a docs site on your subdomain, regenerated on merge. | You host and render the spec yourself. |
| Maintenance | Re-reads the source each run; there are no annotations to keep in sync. | Annotations have to stay in step with the handlers by hand. |
If you need a machine-readable OpenAPI document — for client SDK generation, an API gateway, mock servers, or existing Swagger/ReDoc tooling — an OpenAPI generator is the right choice. It also fits teams that already maintain JSDoc annotations and want exact control over every description in the spec.
If the goal is a readable API reference that stays in step with the code without hand-maintained annotations, Docloom parses the handlers and their Zod schemas directly and writes descriptions over that structure. Fields it cannot resolve are marked “not documented in source” rather than guessed at.
Yes. Publishing an OpenAPI document for machine consumers and a human-readable reference for developers is a common setup, and the two answer different questions. Nothing about Docloom requires you to drop your existing spec tooling.
Paste a public GitHub repo and get the same AST-verified API reference the product produces. No account, no persistence, about a minute.
Open the playground