Aphirox
Aphirox2mo ago

TRPC Docs Generation

Hey, I want to generate a swagger-like interface to document my TRPC api. However, I don't want to use trpc-openapi because I don't want to have to map the endpoints to be restful. I just want to directly generate docs for the rpc calls without converting it into openapi. I found a package that does exactly this, but now I can't find it again for the life of me. Would anyone know which package does this?
2 Replies
jamiedubs
jamiedubs2mo ago
i was just looking for same thing and found this library -- https://github.com/dtinth/openapi-trpc?tab=readme-ov-file -- about a year old but seems like it does what we're both trying to do. specfiles just for the tRPC routes
GitHub
GitHub - dtinth/openapi-trpc: Generate OpenAPI v3 document from a t...
Generate OpenAPI v3 document from a tRPC router, adhering to tRPC’s HTTP RPC Specification - dtinth/openapi-trpc
Aphirox
Aphirox2mo ago
Awesome, thanks!