trpc openapi does not work on app router
https://github.com/jlalmes/trpc-openapi
Can i just know if trpc open api for next is also applicable for app router,
the repo has example for pages router but not for app router, i tried to replicate that to app router but it is failing by something like this
[get-computers is just an api endpoint]
my issue: it is working in pages router but i recently added context to trpc in which i am using nextauth for getting session, latest next auth does not seem to work on pages router as i read through one issue that multiple people are facing this with nextauth
but i wanted to know if i can sue approuter and not rely on pages router to use trpc-openapi-next route handler?
code :
app/api/[...trpc]/route.ts
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.
1 Reply
is createOpenApiNextHandler limited to pages router
or am i doing doing something wrong in implementing that to app router?