Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trpc 11 #434

Open
marc-on-github opened this issue Jan 23, 2024 · 11 comments
Open

trpc 11 #434

marc-on-github opened this issue Jan 23, 2024 · 11 comments

Comments

@marc-on-github
Copy link

warning " > [email protected]" has incorrect peer dependency "@trpc/server@^10.0.0".

Is an update planned?

@Tatamo
Copy link

Tatamo commented Jan 24, 2024

+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.

@ethndotsh
Copy link

+1, Really need this

@zzzev
Copy link

zzzev commented Feb 9, 2024

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

@ethndotsh
Copy link

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.

@crwnd
Copy link

crwnd commented Feb 17, 2024

With dependency override in package.json:

"overrides": {
  "trpc-openapi": {
    "@trpc/server": "^11.0.0-next-beta.289"
  }
}

@tdanh2k
Copy link

tdanh2k commented Mar 17, 2024

+1 Love to see this soon

@kdy1
Copy link

kdy1 commented Jul 30, 2024

I forked it for now.

https://github.com/kdy1/trpc-openapi

npm package: better-trpc-openapi

I applied the patch by @zzzev

@flawnn
Copy link

flawnn commented Sep 10, 2024

I forked it for now.

kdy1/trpc-openapi

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/[email protected]_@[email protected][email protected]/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

@deldrid1
Copy link

deldrid1 commented Sep 12, 2024

In case its helpful to anyone, I ended up forking better-trpc-openapi and fixing quite a few more things. PR is kdy1#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)

@chrisdobler
Copy link

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! deldrid1#1

@mcampa
Copy link

mcampa commented Sep 26, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests