trpc-openapi
trpc-openapi copied to clipboard
[Question] Why are there two routes in the nextjs example?
In the nextjs example there are two routes:
src/pages/api/[...trpc].tssrc/pages/api/trpc/[...trpc].ts
And I cannot figure out why. Can somebody please explain the purpose of each route and when you would use one over the other?
One is the OpenAPI REST route, and the other is the normal tRPC route. They are distinct in the shape of the requests.