UNPKG

@inversify-cn/swagger-express-ts

Version:

Generate and serve swagger.json

22 lines (21 loc) 637 B
import { Router } from 'express'; import { ISwaggerBuildDefinition } from './swagger.builder'; export interface ISwaggerExpressOptions { /** * Path of resource. * Default is "/api-docs/swagger.json". */ path?: string; /** * Swagger Definition. */ definition?: ISwaggerBuildDefinition; /** * Specify which paths will be scanned to discover interfaces and * convert them to models. * * The scanning process is slow, but will only run once per lifecycle. */ interfaceScanPaths?: string[]; } export declare function express(options?: ISwaggerExpressOptions): Router;