Open marc-on-github opened 10 months ago
+1 trpc v11 has not been officially released yet, but I would be very happy if trpc-openapi could be used together with trpc@next.
+1, Really need this
This patch-package patch makes trpc-openapi work w/ trpc@11 for my app -- I'm sure this doesn't account for everything, but may be useful for others looking for a short-term fix: trpc-openapi+1.2.0.patch
This patch-package patch makes trpc-openapi work w/ trpc@11 for my app -- I'm sure this doesn't account for everything, but may be useful for others looking for a short-term fix: trpc-openapi+1.2.0.patch
Yup this worked for me! Thank you.
With dependency override in package.json:
"overrides": {
"trpc-openapi": {
"@trpc/server": "^11.0.0-next-beta.289"
}
}
+1 Love to see this soon
I forked it for now.
https://github.com/kdy1/trpc-openapi
npm package: better-trpc-openapi
I applied the patch by @zzzev
I forked it for now.
npm package:
better-trpc-openapi
I applied the patch by @zzzev
⨯ TypeError: Cannot read properties of undefined (reading 'trpc')
at eval (webpack-internal:///(rsc)/./node_modules/.pnpm/better-trpc-openapi@0.1.0_@trpc+server@11.0.0-rc.502_zod@3.23.8/node_modules/better-trpc-openapi/dist/adapters/next.js:12:30)
Getting the following error - couldn't see an Issues tab on your fork, hence here
In case its helpful to anyone, I ended up forking better-trpc-openapi
and fixing quite a few more things. PR is https://github.com/kdy1/trpc-openapi/pull/2
I'm currently using it like this in my package.json
with pnpm
"better-trpc-openapi": "github:deldrid1/trpc-openapi#a99adb49e8e7c9304aa2988b425d36957d99fc53",
(Make sure you grab the latest commit SHA from https://github.com/deldrid1/trpc-openapi if you want the latest code)
Hey @deldrid1 made one small pr for your fork to fix an issue with unknown errors. Seems to be working other than that. Thank you everyone! https://github.com/deldrid1/trpc-openapi/pull/1
I also have a fork that works with tRPC 11 https://www.npmjs.com/package/trpc-to-openapi
it's been running fine with t3-app/NextJS. However, I don't use other adapters, I fixed all tests cases for everything so in theory they should work. The only thing I couldn't port was the serverless adapter, the trpc implementation changed too much.
This is a fork of another fork (https://github.com/LilyRose2798/trpc-openapi) which uses zod-openapi instead of zod-to-json-schema and some other fixes.
PR are welcomed
warning " > trpc-openapi@1.2.0" has incorrect peer dependency "@trpc/server@^10.0.0".
Is an update planned?