{"repo":"Vercjames/package-trpc-swagger","free":true,"listed":false,"github":"https://github.com/Vercjames/package-trpc-swagger","clone":"git clone https://github.com/Vercjames/package-trpc-swagger.git","description":"Swagger/Openapi wrapper for tRPC","language":"TypeScript","stars":56,"topics":["api","api-rest","next","nextjs14","node","nodejs","rest","swagger","swagger-ui","typescript"],"license":null,"category":"api-integrations-sdks","readme_excerpt":"trpc-swagger Swagger integration for tRPC - Easy REST endpoints for your tRPC procedures. - Perfect for incremental adoption. - OpenAPI version 3.0.3. Fork Notice The original repo trpc-openapi no longer appears to be maintained. The goal of this fork is to add more control for error responses, support more frameworks, and support the new procedure types in @trpc v11.x.x. PRs Are welcome TRPC v10 for those looking for tRPC v10 - please use version ^1.2.8 TRPC v11 for those looking for tRPC v11 - please use version ^2.0.0 Local Examples If you've pulled the repo. you can run any of the example projects by first running these 2 commands: Then select a workspace Ergo Usage 1. Install trpc-swagger 2. Add OpenApiMeta to your tRPC instance 3. Enable openapi support for a procedure. 4. Generate an OpenAPI document. 5. Add an trpc-swagger handler to your app. We currently support adapters for Express , Next.js , Next.js 14 , Serverless , Fastify , Nuxt & Node:HTTP . 6. Profit 🤑 Requirements Peer dependencies Your application requires these 2 packages installed - tRPC Server v110 ( @trpc/server ) must be installed. - Zod v3 ( zod@^3.14.4 ) must be installed (recommended ^3.20.0 ). Procedure support For a procedure to support OpenAPI the following must be true: - Both input and output parsers are present AND use Zod validation. - Query input parsers extend Object or Void . - Mutation input parsers extend Object or Void . - meta.openapi.method is GET , POST , PATCH , PUT or DELETE . - ","default_branch":null,"files":null,"tree":[],"storefront":"/r/Vercjames","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/Vercjames/package-trpc-swagger/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}