diff --git a/src/auth/dto/login-request.dto.ts b/src/auth/dto/login-request.dto.ts index 11a2ee2..2160dd5 100644 --- a/src/auth/dto/login-request.dto.ts +++ b/src/auth/dto/login-request.dto.ts @@ -1,9 +1,12 @@ import { IsString } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; export class LoginRequestDto { @IsString() + @ApiProperty() username: string; @IsString() + @ApiProperty() password: string; } diff --git a/src/user/dto/create-user.dto.ts b/src/user/dto/create-user.dto.ts index eec4673..ef2925f 100644 --- a/src/user/dto/create-user.dto.ts +++ b/src/user/dto/create-user.dto.ts @@ -1,14 +1,18 @@ import { IsString, IsEmail, MinLength } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; export class CreateUserDto { @IsString() @MinLength(3) + @ApiProperty() username: string; @IsEmail() + @ApiProperty() email: string; @IsString() @MinLength(6) + @ApiProperty() password: string; } diff --git a/src/user/dto/update-user.dto.ts b/src/user/dto/update-user.dto.ts index 62b3a6f..512337f 100644 --- a/src/user/dto/update-user.dto.ts +++ b/src/user/dto/update-user.dto.ts @@ -1,17 +1,24 @@ import { IsString, IsEmail, MinLength, IsOptional } from 'class-validator'; +import { ApiProperty } from '@nestjs/swagger'; export class UpdateUserDto { @IsOptional() @IsString() @MinLength(3) + @ApiProperty() username?: string; + @IsOptional() @IsEmail() + @ApiProperty() email?: string; + @IsOptional() @IsString() @MinLength(6) + @ApiProperty() password?: string; + }