swagger-typed-express-docs
Version:
Simple express runtime parser and documentation swagger generator with 100% support of Typescript static types
15 lines (14 loc) • 705 B
TypeScript
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 generateOpenAPIPath: (schemas: GenerateOpenAPIPathArg, mutDefinitions: 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 {};