r/javascript • u/ty_namo • Oct 16 '26
AskJS [AskJS] What are your opinions on express-zod-api?
Context: I'm coming from Python with FastAPI and want to try build a similar app using express, but the thing i'm most lazy about is definitely configuring swagger, compared to the built-in swagger integration that fastapi provides. apparently express-zod-api tries to bridge that gap, but i don't know how good is it?
3
Upvotes
2
u/zomerbk Oct 16 '26
It can cover a lot of the FastAPI-style workflow: define Zod input/output schemas, then generate OpenAPI docs from those schemas. The trade-off is that you’re adopting the library’s endpoint and middleware conventions, so it’s more opinionated than adding Swagger to a regular Express app. I’d try a small endpoint with your auth/error-handling setup first and check whether the generated spec captures the docs and response details you need. [Project docs](https://github.com/RobinTail/express-zod-api)
2
u/static_func Oct 18 '26
Unless there’s a specific reason for using Express, you should use a more modern web framework instead like Hono, which has its own hono-openapi package maintained by the same Hono team