-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[GWL-77] auth, profile 스웨거 작성 (#110)
* feat: swagger 작업 * chore: format 적용
- Loading branch information
Showing
6 changed files
with
88 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { ApiProperty, PickType } from '@nestjs/swagger'; | ||
|
||
class SuccessResDto { | ||
@ApiProperty({ description: '에러가 없는 경우 null' }) | ||
code: number; | ||
|
||
@ApiProperty({ description: '에러가 없는 경우 null' }) | ||
errorMessage: string; | ||
} | ||
|
||
class Token { | ||
@ApiProperty({ | ||
example: 'ewaf1313RWDFA...', | ||
description: 'Access Token 입니다.', | ||
}) | ||
accessToken: string; | ||
|
||
@ApiProperty({ | ||
example: 'ewaf1313RWDFA...', | ||
description: 'Refresh Token 입니다.', | ||
}) | ||
refreshToken: string; | ||
} | ||
|
||
export class SignupResDto extends SuccessResDto { | ||
@ApiProperty({ type: () => Token }) | ||
data: Token; | ||
} | ||
|
||
export class CreateAccessTokenResDto extends SuccessResDto { | ||
@ApiProperty({ type: () => PickType(Token, ['accessToken']) }) | ||
data: Pick<Token, 'accessToken'>; | ||
} | ||
|
||
export class CreateRefreshTokenResDto extends SuccessResDto { | ||
@ApiProperty({ type: () => PickType(Token, ['refreshToken']) }) | ||
data: Pick<Token, 'refreshToken'>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters