// the find
trpc/trpc-openapi
OpenAPI support for tRPC 🧩
trpc-openapi bridges tRPC v10 procedures to a standard REST/OpenAPI interface by adding metadata annotations to your router. Useful when you need to expose a tRPC backend to REST clients, generate Swagger docs, or integrate with third-party tools that don't speak tRPC's wire protocol.
The annotation model is minimal — one `meta` field per procedure, no separate route definitions. Zod schemas do double duty as both runtime validation and OpenAPI schema generation, so the spec stays in sync with the code automatically. Adapter coverage is decent: Express, Next.js, Fastify, AWS Lambda, Nuxt, and Node HTTP are all there. The test suite is thorough enough that you can trust the basics work.
The repo is archived with no active maintainers — the README literally says they might turn it into a paid package, which is a red flag for anything you'd ship to production. It's pinned to tRPC v10 and Zod v3; tRPC has moved and Zod v4 dropped, so you're adopting something that's already behind. Query parameters can only be flat primitives (strings, numbers, booleans) — no nested objects or arrays without `z.preprocess` gymnastics, which is a meaningful constraint for real APIs. Data transformers like superjson are silently ignored, which will surprise anyone who relies on them for date serialization.