UNPKG

openapi-zod-typed-express

Version:

Simple express runtime parser and documentation swagger generator with 100% support of Typescript static types

15 lines (14 loc) 666 B
import { type z } from 'zod'; type GenerateOpenAPIPathArg = { headersSchema: z.ZodObject | null | undefined; querySchema: z.ZodObject | null | undefined; pathSchema: z.ZodObject | null | undefined; bodySchema: z.ZodObject | null | undefined; returnsSchema: z.ZodObject | null | undefined; }; export declare const generateOpenAPIPath: (schemas: GenerateOpenAPIPathArg) => any; type Method = string; type EndpointPath = string; export type UrlsMethodDocs = Record<EndpointPath, Record<Method, GenerateOpenAPIPathArg>>; export declare const convertUrlsMethodsSchemaToOpenAPI: (obj: UrlsMethodDocs) => Record<string, Record<string, any>>; export {};