doc-it-up
Version:
Generates automatic documentation for your code. Supports Express, Fastify, Koa, Hono, Elysia, and Hapi.
23 lines (22 loc) • 659 B
TypeScript
export interface DocRequest {
method: string;
path: string;
headers: Record<string, any>;
query: Record<string, any>;
body: any;
params?: Record<string, any>;
files?: Record<string, any> | any[];
}
export interface DocResponse {
statusCode: number;
statusMessage?: string;
headers: Record<string, any>;
body: any;
}
export declare const initDocsDirectory: (customDocsDir?: string) => Promise<void>;
export declare class DocItUpCore {
static recordRequest(req: DocRequest, res: DocResponse): Promise<void>;
static loadSpecs(): Promise<void>;
static getSwaggerSpec(): any;
static getHtml(): string;
}