trpc-openapi icon indicating copy to clipboard operation
trpc-openapi copied to clipboard

Any plans to seek a new maintainer?

Open musjj opened this issue 1 year ago • 12 comments

It looks like a year has passed since the last commit and @jlalmes is now focusing on other things according to the bio in his profile.

Are there any plans to pass down the project to a new maintainer? I'm really thankful for this project, but it's really a shame to see it slowly becoming incompatible with the ecosystem:

  • https://github.com/jlalmes/trpc-openapi/issues/442
  • https://github.com/jlalmes/trpc-openapi/issues/434

For now I'm making do by using:

  • https://github.com/jlalmes/trpc-openapi/pull/315 for Next.js 14 support (you can vendor src/adapters/fetch.ts into your project)
  • https://github.com/jlalmes/trpc-openapi/issues/434#issuecomment-1936587096 for tRPC v11 patch

I haven't tested them extensively, but they do work decently on my small projects.

musjj avatar Jul 01 '24 10:07 musjj

@musjj , add this one as well. Unable to generate openapi contract json due to updations on how a procedure definition is generated by latest @trpc/server (right now i'm using 11-rc version)

  • https://github.com/jlalmes/trpc-openapi/issues/431

KiranMantha avatar Jul 04 '24 04:07 KiranMantha

@jlalmes Do you have time to review/merge PRs? If not, can I do it instead?

As a side note, I'm the creator of the SWC project and maintainer of next.js/turbopack, although I'll not use working hours for this.

kdy1 avatar Jul 29 '24 14:07 kdy1

I forked it for now.

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

npm package: better-trpc-openapi

kdy1 avatar Jul 30 '24 05:07 kdy1

Also a popup package here: https://github.com/vercjames/package-trpc-swagger

bompi88 avatar Aug 22 '24 10:08 bompi88

@kdy1 I'm getting the following error when errors are thrown or malformed JSON is posted to one of the endpoints:

TypeError: router._def.getErrorShape is not a function
    at ~/whatever/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/better-trpc-openapi/src/adapters/node-http/core.ts:168:38
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ~/whatever/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/better-trpc-openapi/src/adapters/express.ts:18:5

Have you encountered this TypeError before and if so, what am I doing wrong here?

bompi88 avatar Aug 22 '24 11:08 bompi88

@kdy1 I'm getting the following error when errors are thrown or malformed JSON is posted to one of the endpoints:

TypeError: router._def.getErrorShape is not a function
    at ~/whatever/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/better-trpc-openapi/src/adapters/node-http/core.ts:168:38
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async ~/whatever/node_modules/.pnpm/[email protected]_@[email protected][email protected]/node_modules/better-trpc-openapi/src/adapters/express.ts:18:5

Have you encountered this TypeError before and if so, what am I doing wrong here?

Encountering this same issue right now

Westernwells avatar Aug 25 '24 13:08 Westernwells

@kdy1 are you still interested in this? @jlalmes do you have any thoughts? I've love if we could organize a group of folks to maintain this actively. Maybe we could do a brief huddle with 1-3 folks who are using this project in production and try to get a fork properly maintained.

tristanz avatar Sep 04 '24 22:09 tristanz

@tristanz Yes, I don't actively use my fork at the moment, but I'll need to expose my APIs in my private project in a near future.

kdy1 avatar Sep 09 '24 01:09 kdy1

I 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

mcampa avatar Sep 11 '24 01:09 mcampa

@kdy1 are you actively maintaining your fork? If not, would you be open to us taking it over? We're going to be using it and committing to it.

tayhalla avatar Oct 28 '24 03:10 tayhalla

@tayhalla Of course. Are you going to maintain it as a team?

kdy1 avatar Oct 28 '24 05:10 kdy1

Is there any fork that works fine with NextJS app router? I've only found examples with the old pages router, and although the tRPC > OpenAPI conversion works fine, I've been struggling to set up a request handler using app router.

Thanks in advance!

Update: trpc-to-openapi (https://www.npmjs.com/package/trpc-to-openapi) finally worked for me with both tRPC v11 and NextJS 15 👍 . Huge thanks to @mcampa

rokitgg avatar Oct 29 '24 19:10 rokitgg