UNPKG

swagger-typed-express-docs

Version:

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

16 lines (15 loc) 797 B
import { TObject, TSchema } from './tsSchema'; type GenerateOpenAPIPathArg = { headersSchema: TObject | null | undefined; querySchema: TObject | null | undefined; pathSchema: TObject | null | undefined; bodySchema: TObject | null | undefined; returnsSchema: TSchema | null | undefined; }; export declare const tSchemaToJsonSchema: (schema: TSchema, mut_definitions?: any) => any; export declare const generateOpenAPIPath: (schemas: GenerateOpenAPIPathArg, mut_definitions: any) => any; type Method = string; type EndpointPath = string; export type UrlsMethodDocs = Record<EndpointPath, Record<Method, GenerateOpenAPIPathArg>>; export declare const convertUrlsMethodsSchemaToOpenAPI: (obj: UrlsMethodDocs, mutDefinitions: any) => Record<string, Record<string, any>>; export {};