samchon / nestia

NestJS Helper Libraries + TypeScript OpenAPI generator
https://nestia.io/
MIT License
1.79k stars 92 forks source link

New decorator, `@SwaggerCustomizer()` #810

Closed samchon closed 6 months ago

samchon commented 6 months ago
export function SwaggerCustomizer(
  closure: (props: SwaggerCustomizer.IProps) => unknown,
): MethodDecorator;
export namespace SwaggerCustomizer {
  export interface IProps {
    swagger: ISwagger;
    method: string;
    path: string;
    route: ISwaggerRoute;
    get(p: { path: string; method: string }): ISwaggerRoute | null;
  }
}

Will add a new decorator which can customize the Swagger Documents.