trpc-to-openapi
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -1,4 +0,3 @@ | ||
import { OpenAPIObject, SecuritySchemeObject } from 'openapi3-ts/dist/oas31'; | ||
import { ZodOpenApiObject, ZodOpenApiPathsObject } from 'zod-openapi'; | ||
import { OpenApiRouter } from '../types'; | ||
import { type OpenAPIObject, OpenApiRouter, type SecuritySchemeObject } from '../types'; | ||
export type GenerateOpenApiDocumentOptions = { | ||
@@ -5,0 +4,0 @@ title: string; |
@@ -0,1 +1,2 @@ | ||
import { OpenApiBuilder } from 'openapi3-ts/oas31'; | ||
import { CreateOpenApiAwsLambdaHandlerOptions, CreateOpenApiExpressMiddlewareOptions, CreateOpenApiFastifyPluginOptions, CreateOpenApiFetchHandlerOptions, CreateOpenApiHttpHandlerOptions, CreateOpenApiNextHandlerOptions, CreateOpenApiNuxtHandlerOptions, createOpenApiAwsLambdaHandler, createOpenApiExpressMiddleware, createOpenApiFetchHandler, createOpenApiHttpHandler, createOpenApiNextHandler, createOpenApiNuxtHandler, fastifyTRPCOpenApiPlugin } from './adapters'; | ||
@@ -6,3 +7,3 @@ import { GenerateOpenApiDocumentOptions, generateOpenApiDocument } from './generator'; | ||
import { ZodTypeLikeString, ZodTypeLikeVoid } from './utils/zod'; | ||
export { CreateOpenApiAwsLambdaHandlerOptions, CreateOpenApiExpressMiddlewareOptions, CreateOpenApiHttpHandlerOptions, CreateOpenApiNextHandlerOptions, CreateOpenApiFastifyPluginOptions, CreateOpenApiFetchHandlerOptions, CreateOpenApiNuxtHandlerOptions, createOpenApiExpressMiddleware, createOpenApiFetchHandler, createOpenApiHttpHandler, createOpenApiNextHandler, createOpenApiNuxtHandler, createOpenApiAwsLambdaHandler, fastifyTRPCOpenApiPlugin, generateOpenApiDocument, errorResponseObject, errorResponseFromStatusCode, errorResponseFromMessage, GenerateOpenApiDocumentOptions, OpenApiRouter, OpenApiMeta, OpenApiMethod, OpenApiResponse, OpenApiSuccessResponse, OpenApiErrorResponse, ZodTypeLikeString, ZodTypeLikeVoid, }; | ||
export { CreateOpenApiAwsLambdaHandlerOptions, CreateOpenApiExpressMiddlewareOptions, CreateOpenApiHttpHandlerOptions, CreateOpenApiNextHandlerOptions, CreateOpenApiFastifyPluginOptions, CreateOpenApiFetchHandlerOptions, CreateOpenApiNuxtHandlerOptions, createOpenApiExpressMiddleware, createOpenApiFetchHandler, createOpenApiHttpHandler, createOpenApiNextHandler, createOpenApiNuxtHandler, createOpenApiAwsLambdaHandler, fastifyTRPCOpenApiPlugin, generateOpenApiDocument, errorResponseObject, errorResponseFromStatusCode, errorResponseFromMessage, GenerateOpenApiDocumentOptions, OpenApiBuilder, OpenApiRouter, OpenApiMeta, OpenApiMethod, OpenApiResponse, OpenApiSuccessResponse, OpenApiErrorResponse, ZodTypeLikeString, ZodTypeLikeVoid, }; | ||
//# sourceMappingURL=index.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.errorResponseFromMessage = exports.errorResponseFromStatusCode = exports.errorResponseObject = exports.generateOpenApiDocument = exports.fastifyTRPCOpenApiPlugin = exports.createOpenApiAwsLambdaHandler = exports.createOpenApiNuxtHandler = exports.createOpenApiNextHandler = exports.createOpenApiHttpHandler = exports.createOpenApiFetchHandler = exports.createOpenApiExpressMiddleware = void 0; | ||
exports.OpenApiBuilder = exports.errorResponseFromMessage = exports.errorResponseFromStatusCode = exports.errorResponseObject = exports.generateOpenApiDocument = exports.fastifyTRPCOpenApiPlugin = exports.createOpenApiAwsLambdaHandler = exports.createOpenApiNuxtHandler = exports.createOpenApiNextHandler = exports.createOpenApiHttpHandler = exports.createOpenApiFetchHandler = exports.createOpenApiExpressMiddleware = void 0; | ||
const oas31_1 = require("openapi3-ts/oas31"); | ||
Object.defineProperty(exports, "OpenApiBuilder", { enumerable: true, get: function () { return oas31_1.OpenApiBuilder; } }); | ||
const adapters_1 = require("./adapters"); | ||
@@ -5,0 +7,0 @@ Object.defineProperty(exports, "createOpenApiAwsLambdaHandler", { enumerable: true, get: function () { return adapters_1.createOpenApiAwsLambdaHandler; } }); |
@@ -6,2 +6,3 @@ import { Procedure, ProcedureParams, Router } from '@trpc/server'; | ||
import { AnyZodObject, ZodIssue } from 'zod'; | ||
export { type OpenAPIObject, type SecuritySchemeObject } from 'openapi3-ts/oas31'; | ||
export type OpenApiMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE'; | ||
@@ -49,3 +50,2 @@ type TRPCMeta = Record<string, unknown>; | ||
export type OpenApiResponse<D = any> = OpenApiSuccessResponse<D> | OpenApiErrorResponse; | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
@@ -1,4 +0,3 @@ | ||
import { OpenAPIObject, SecuritySchemeObject } from 'openapi3-ts/dist/oas31'; | ||
import { ZodOpenApiObject, ZodOpenApiPathsObject } from 'zod-openapi'; | ||
import { OpenApiRouter } from '../types'; | ||
import { type OpenAPIObject, OpenApiRouter, type SecuritySchemeObject } from '../types'; | ||
export type GenerateOpenApiDocumentOptions = { | ||
@@ -5,0 +4,0 @@ title: string; |
@@ -0,1 +1,2 @@ | ||
import { OpenApiBuilder } from 'openapi3-ts/oas31'; | ||
import { CreateOpenApiAwsLambdaHandlerOptions, CreateOpenApiExpressMiddlewareOptions, CreateOpenApiFastifyPluginOptions, CreateOpenApiFetchHandlerOptions, CreateOpenApiHttpHandlerOptions, CreateOpenApiNextHandlerOptions, CreateOpenApiNuxtHandlerOptions, createOpenApiAwsLambdaHandler, createOpenApiExpressMiddleware, createOpenApiFetchHandler, createOpenApiHttpHandler, createOpenApiNextHandler, createOpenApiNuxtHandler, fastifyTRPCOpenApiPlugin } from './adapters'; | ||
@@ -6,3 +7,3 @@ import { GenerateOpenApiDocumentOptions, generateOpenApiDocument } from './generator'; | ||
import { ZodTypeLikeString, ZodTypeLikeVoid } from './utils/zod'; | ||
export { CreateOpenApiAwsLambdaHandlerOptions, CreateOpenApiExpressMiddlewareOptions, CreateOpenApiHttpHandlerOptions, CreateOpenApiNextHandlerOptions, CreateOpenApiFastifyPluginOptions, CreateOpenApiFetchHandlerOptions, CreateOpenApiNuxtHandlerOptions, createOpenApiExpressMiddleware, createOpenApiFetchHandler, createOpenApiHttpHandler, createOpenApiNextHandler, createOpenApiNuxtHandler, createOpenApiAwsLambdaHandler, fastifyTRPCOpenApiPlugin, generateOpenApiDocument, errorResponseObject, errorResponseFromStatusCode, errorResponseFromMessage, GenerateOpenApiDocumentOptions, OpenApiRouter, OpenApiMeta, OpenApiMethod, OpenApiResponse, OpenApiSuccessResponse, OpenApiErrorResponse, ZodTypeLikeString, ZodTypeLikeVoid, }; | ||
export { CreateOpenApiAwsLambdaHandlerOptions, CreateOpenApiExpressMiddlewareOptions, CreateOpenApiHttpHandlerOptions, CreateOpenApiNextHandlerOptions, CreateOpenApiFastifyPluginOptions, CreateOpenApiFetchHandlerOptions, CreateOpenApiNuxtHandlerOptions, createOpenApiExpressMiddleware, createOpenApiFetchHandler, createOpenApiHttpHandler, createOpenApiNextHandler, createOpenApiNuxtHandler, createOpenApiAwsLambdaHandler, fastifyTRPCOpenApiPlugin, generateOpenApiDocument, errorResponseObject, errorResponseFromStatusCode, errorResponseFromMessage, GenerateOpenApiDocumentOptions, OpenApiBuilder, OpenApiRouter, OpenApiMeta, OpenApiMethod, OpenApiResponse, OpenApiSuccessResponse, OpenApiErrorResponse, ZodTypeLikeString, ZodTypeLikeVoid, }; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -6,2 +6,3 @@ import { Procedure, ProcedureParams, Router } from '@trpc/server'; | ||
import { AnyZodObject, ZodIssue } from 'zod'; | ||
export { type OpenAPIObject, type SecuritySchemeObject } from 'openapi3-ts/oas31'; | ||
export type OpenApiMethod = 'GET' | 'POST' | 'PATCH' | 'PUT' | 'DELETE'; | ||
@@ -49,3 +50,2 @@ type TRPCMeta = Record<string, unknown>; | ||
export type OpenApiResponse<D = any> = OpenApiSuccessResponse<D> | OpenApiErrorResponse; | ||
export {}; | ||
//# sourceMappingURL=types.d.ts.map |
{ | ||
"name": "trpc-to-openapi", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "tRPC OpenAPI", | ||
@@ -32,2 +32,3 @@ "author": "mcampa <lily@rose.place>", | ||
".", | ||
"examples/with-nextjs-appdir", | ||
"examples/with-nextjs", | ||
@@ -44,3 +45,3 @@ "examples/with-express", | ||
"lint-fix": "eslint . --ext .ts --fix", | ||
"build": "rimraf dist && npm run build:cjs && npm run build:esm", | ||
"build": "npm test && rimraf dist && npm run build:cjs && npm run build:esm", | ||
"build:cjs": "tsc -p tsconfig.build.cjs.json", | ||
@@ -47,0 +48,0 @@ "build:esm": "tsc -p tsconfig.build.esm.json", |
@@ -1,3 +0,4 @@ | ||
![trpc-to-openapi](assets/trpc-to-openapi-readme.png) | ||
<p align="center"> | ||
<img src="assets/trpc-openapi.svg"> | ||
</p> | ||
<div align="center"> | ||
@@ -11,4 +12,2 @@ <h1>trpc-to-openapi</h1> | ||
--- | ||
## **[OpenAPI](https://swagger.io/specification/) support for [tRPC](https://trpc.io/)** 𧩠| ||
@@ -20,2 +19,4 @@ | ||
Note: This project is a fork of a fork, with full credit to the original authors. It appears that the original author has abandoned the project, so I plan to add new features in the near future. | ||
## Usage | ||
@@ -22,0 +23,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
268493
2903
366