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

Feat: tRPC V10 Support

Open mshd opened this issue 3 years ago • 2 comments

Hi James, Is the tRPC alpha version 10 already supported? If not, when would it be possible? Also since this package is so closely tied and useful to tRPC, has it been considered to be merged into the tRPC monorepo?

mshd avatar Jul 17 '22 02:07 mshd

as it was previously

export const createRouter = () => {
  return trpc.router<Context, OpenApiMeta>();
};

I've tried to use it now like this: export const t = initTRPC<{ ctx: Context; meta: OpenApiMeta }>()();

However I get an error when using

t.procedure.meta({ openapi: { enabled: true, .... } }).

mshd avatar Jul 17 '22 10:07 mshd

Hi @mshd - v10 is not supported yet. It might take me a couple of weeks to get to this, but feel free to open a PR yourself if this is a requirement! 🙌

EDIT: Going to delay the development of this until the public v10 alpha is released. Looks like there is likely going to be more API changes before then.

jlalmes avatar Jul 18 '22 08:07 jlalmes

@jlalmes Any updates on this? :)

albertilagan avatar Aug 21 '22 01:08 albertilagan

@albertilagan still waiting for the public tRPC v10@alpha to be released!

jlalmes avatar Aug 22 '22 16:08 jlalmes

looking forward on this

ibrahimyaacob92 avatar Aug 28 '22 04:08 ibrahimyaacob92

Just shipped tRPC v10 support.

To get started, please see 👉 https://github.com/jlalmes/trpc-openapi/blob/next/README.md Full list of breaking changes 👉 https://github.com/jlalmes/trpc-openapi/pull/143

jlalmes avatar Sep 08 '22 09:09 jlalmes