1. Installtrpc-openapi. #npmnpm install trpc-openapi#yarnyarn add trpc-openapi 2. AddOpenApiMetato your tRPC instance. import{initTRPC}from'@trpc/server';import{OpenApiMeta}from'trpc-openapi';constt=initTRPC.meta<OpenApiMeta>().create();/* 👈 */ 3. Enableopenapisupport for a procedure....
Not to be confused with trpc-openapi. The openapi-trpc package is a tool to generate OpenAPI v3 spec from a tRPC router, adhering to tRPC’s HTTP RPC Specification. This lets you take an existing tRPC router, and generate an OpenAPI spec from it. From there, you can use the spec to ...
Breadcrumbs trpc-openapi / tsconfig.json Latest commit Cannot retrieve latest commit at this time. HistoryHistory File metadata and controls Code Blame 19 lines (19 loc) · 425 Bytes Raw { "compilerOptions": { "outDir": "dist", "target": "ES2017", "module": "commonjs", "strict":...
Saved searches Use saved searches to filter your results more quickly Cancel Create saved search Sign in Sign up {{ message }} visca-ai / trpc-openapi Public Notifications You must be signed in to change notification settings Fork 0 Star 0 License MIT license ...
const openApiDocument = generateOpenApiDocument(appRouter, defaultDocOpts);expect(openApiSchemaValidator.validate(openApiDocument).errors).toEqual([]); expect(openApiDocument.paths['/deprecated']!.post!.deprecated).toEqual(true); });test('with security schemes', () => {...
Not to be confused with trpc-openapi. The openapi-trpc package is a tool to generate OpenAPI v3 spec from a tRPC router, adhering to tRPC’s HTTP RPC Specification. This lets you take an existing tRPC router, and generate an OpenAPI spec from it. From there, you can use the spec to ...