Estoy investigando la forma de evitar especificar @ApiProperty() en cada dto.
Sé que existe una manera de crear el archivo nest-cli.json , y si especifica Promise<DTO> en su controlador en nest-swagger, producirá la salida dto de la ruta.
La estructura se ve así:
nest-cli.json
{ "collection": "@nestjs/schematics", "sourceRoot": "src", "compilerOptions": { "plugins": [ { "name": "@nestjs/swagger", "options": { "introspectComments": true } } ] } } controller.ts
@Get() async getMonitors (): Promise<OutputMonitorsDto> { // <-- Here is my outputDto return this.monitorsService.getMonitors() } Y en swagger muestra algo como esto: 
Sin embargo, ¿hay alguna forma de configurar NestJs para tener las mismas cosas con inputDTO y no escribir en cada dto @ApiProperty ?
Como en el ejemplo a continuación:
ExampleDto.ts
export class GetListUsersDto { @ApiProperty() @IsString() name: string @ApiProperty() @IsString() email: string @ApiProperty() @IsString() publicApiKey: string @ApiProperty() @IsBoolean() isAdmin: boolean @ApiProperty() @IsBoolean() isDesigner: boolean @ApiProperty() @IsBoolean() isEditor: boolean @ApiProperty() @IsBoolean() isEnabled: boolean @ApiProperty() @IsString() boughtProduct: string }Y solo después de @ApiProperty, mostrará la estructura como se muestra arriba para la entrada en swagger.
No hay forma de evitar decorar sus propiedades DTO. Sin embargo, si sus DTO tienen mucho en común, es posible que esté buscando tipos asignados . La documentación se puede encontrar aquí .
Básicamente, le permiten transformar los tipos existentes para mantener sus DTO SECOS.