Skip to content

Commit 87ef839

Browse files
committed
♻️ refactor: dto example 추가
1 parent 59734dc commit 87ef839

File tree

8 files changed

+14
-8
lines changed

8 files changed

+14
-8
lines changed

server/src/comment/dto/request/create-comment.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export class CreateCommentRequestDto {
1414
comment: string;
1515

1616
@ApiProperty({
17-
example: '1',
17+
example: 1,
1818
description: '게시글 번호를 입력해주세요.',
1919
})
2020
@IsInt({

server/src/comment/dto/request/delete-comment.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IsInt, IsNotEmpty } from 'class-validator';
44

55
export class DeleteCommentRequestDto {
66
@ApiProperty({
7-
example: '1',
7+
example: 1,
88
description: '댓글 번호를 입력해주세요.',
99
})
1010
@IsInt({

server/src/comment/dto/request/get-comment.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IsInt } from 'class-validator';
44

55
export class GetCommentRequestDto {
66
@ApiProperty({
7-
example: '게시글 ID',
7+
example: 1,
88
description: '게시글 ID를 입력해주세요',
99
})
1010
@IsInt({

server/src/comment/dto/request/update-comment.dto.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { IsInt, IsNotEmpty, IsString } from 'class-validator';
44

55
export class UpdateCommentRequestDto {
66
@ApiProperty({
7-
example: '댓글 번호',
7+
example: 1,
88
description: '댓글 번호를 입력해주세요.',
99
})
1010
@IsInt({

server/src/rss/dto/request/rss-management.dto.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,12 @@
11
import { IsInt } from 'class-validator';
22
import { Type } from 'class-transformer';
3+
import { ApiProperty } from '@nestjs/swagger';
34

45
export class RssManagementRequestDto {
6+
@ApiProperty({
7+
example: 1,
8+
description: 'RSS ID',
9+
})
510
@IsInt({
611
message: '정수를 입력해주세요.',
712
})

server/src/statistic/dto/request/statistic-query.dto.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { IsInt, IsOptional, Min } from 'class-validator';
44

55
export class StatisticRequestDto {
66
@ApiProperty({
7+
example: 1,
78
description: '최대로 가져올 데이터 개수를 입력하세요.',
89
required: false,
910
})

server/src/user/dto/request/login.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ import { IsEmail, IsNotEmpty } from 'class-validator';
33

44
export class LoginDto {
55
@ApiProperty({
6-
example: 'test123@test.com',
6+
example: 'example@example.com',
77
description: '이메일을 입력해주세요.',
88
})
99
@IsEmail({}, { message: '이메일 주소 형식에 맞춰서 작성해주세요.' })
1010
@IsNotEmpty({ message: '이메일을 입력하세요.' })
1111
email: string;
1212

1313
@ApiProperty({
14-
example: 'test1234!',
14+
example: 'example1234!',
1515
description: '비밀번호를 입력해주세요.',
1616
})
1717
@IsNotEmpty({ message: '비밀번호를 입력하세요.' })

server/src/user/dto/request/register.dto.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { ApiProperty } from '@nestjs/swagger';
44

55
export class RegisterDto {
66
@ApiProperty({
7-
example: 'test123@test.com',
7+
example: 'example@example.com',
88
description: '이메일을 입력해주세요.',
99
})
1010
@IsEmail(
@@ -19,7 +19,7 @@ export class RegisterDto {
1919
email: string;
2020

2121
@ApiProperty({
22-
example: 'test1234!',
22+
example: 'example1234!',
2323
description: '비밀번호를 입력해주세요.',
2424
})
2525
@IsNotEmpty({

0 commit comments

Comments
 (0)