Help adding trpc-openapi to t3 app
Hi, can anyone help adding https://github.com/jlalmes/trpc-openapi properly to my existing t3 app?
So far I have this
Here: server/api/openapi.ts
And I added this sayHello example route to my router:
But I am confused, how I should resume and actually start it
GitHub
GitHub - jlalmes/trpc-openapi: OpenAPI support for tRPC ๐งฉ
OpenAPI support for tRPC ๐งฉ. Contribute to jlalmes/trpc-openapi development by creating an account on GitHub.
10 Replies
The t3 app runs on http://localhost:3000, not even sure if the baseUrl should be the same url in the
openApiDocument
have you tried following the steps on the github readme that you linked to
@ccccjjjjeeee yes but I am a bit confused I am "stuck" at this step:
Where would I need to put it and also would it listen to the same port?
๐
That part is for express. They have examples for a bunch of backends in the repo https://github.com/jlalmes/trpc-openapi/tree/master/examples
GitHub
trpc-openapi/examples at master ยท jlalmes/trpc-openapi
OpenAPI support for tRPC ๐งฉ. Contribute to jlalmes/trpc-openapi development by creating an account on GitHub.
Hello there
I cant run the openapi doc
Im working with T3 but IM stuck on this step:
because the t3 file is pretty different and Im stuck with the doc ๐ฆ
I follow every step (Skipping Express ๐ )
I am stuck at the same point. The issue as I see it is this part in
app/api/trpc/[trpc]/route.ts
the handler for me is created like so (fresh t3 project) I dont see what to replace here with the createOpenApiNextHandler
(using app router btw)pretty sure trpc-openapi is dead at this point. if you use v11 it wont work for sure, pretty sure that for the newer versions of v10 its also broken
and t3 in app router uses v11 for trpc from what I remember
oh... that kinda sucks. thanks for the reply tho!
Hey, is there any way to create a webhook with T3, or is making a standalone server/endpoint the only option?
Excuse me if there is an obvious answer, new to t3
easiest to just use a normal next.js api route
you get no benefit from using trpc for a webhook