|
1 | 1 | package com.back.domain.user.controller; |
2 | 2 |
|
3 | | -import com.back.domain.user.dto.LoginRequest; |
4 | | -import com.back.domain.user.dto.LoginResponse; |
5 | | -import com.back.domain.user.dto.UserRegisterRequest; |
6 | | -import com.back.domain.user.dto.UserResponse; |
| 3 | +import com.back.domain.user.dto.*; |
7 | 4 | import com.back.global.common.dto.RsData; |
8 | 5 | import io.swagger.v3.oas.annotations.Operation; |
9 | 6 | import io.swagger.v3.oas.annotations.media.Content; |
@@ -225,6 +222,92 @@ ResponseEntity<RsData<UserResponse>> verifyEmail( |
225 | 222 | @RequestParam("token") String token |
226 | 223 | ); |
227 | 224 |
|
| 225 | + @Operation( |
| 226 | + summary = "인증 메일 재발송", |
| 227 | + description = "회원가입 후 아직 활성화되지 않은 계정에 대해 인증 메일을 재발송합니다. " + |
| 228 | + "새 토큰이 생성되어 메일이 발송됩니다." |
| 229 | + ) |
| 230 | + @ApiResponses({ |
| 231 | + @ApiResponse( |
| 232 | + responseCode = "200", |
| 233 | + description = "인증 메일 재발송 성공", |
| 234 | + content = @Content( |
| 235 | + mediaType = "application/json", |
| 236 | + examples = @ExampleObject(value = """ |
| 237 | + { |
| 238 | + "success": true, |
| 239 | + "code": "SUCCESS_200", |
| 240 | + "message": "인증 메일이 재발송되었습니다.", |
| 241 | + "data": null |
| 242 | + } |
| 243 | + """) |
| 244 | + ) |
| 245 | + ), |
| 246 | + @ApiResponse( |
| 247 | + responseCode = "404", |
| 248 | + description = "존재하지 않는 사용자", |
| 249 | + content = @Content( |
| 250 | + mediaType = "application/json", |
| 251 | + examples = @ExampleObject(value = """ |
| 252 | + { |
| 253 | + "success": false, |
| 254 | + "code": "USER_001", |
| 255 | + "message": "존재하지 않는 사용자입니다.", |
| 256 | + "data": null |
| 257 | + } |
| 258 | + """) |
| 259 | + ) |
| 260 | + ), |
| 261 | + @ApiResponse( |
| 262 | + responseCode = "409", |
| 263 | + description = "이미 인증된 계정", |
| 264 | + content = @Content( |
| 265 | + mediaType = "application/json", |
| 266 | + examples = @ExampleObject(value = """ |
| 267 | + { |
| 268 | + "success": false, |
| 269 | + "code": "TOKEN_002", |
| 270 | + "message": "이미 인증된 계정입니다.", |
| 271 | + "data": null |
| 272 | + } |
| 273 | + """) |
| 274 | + ) |
| 275 | + ), |
| 276 | + @ApiResponse( |
| 277 | + responseCode = "400", |
| 278 | + description = "잘못된 요청 (이메일 필드 누락 등)", |
| 279 | + content = @Content( |
| 280 | + mediaType = "application/json", |
| 281 | + examples = @ExampleObject(value = """ |
| 282 | + { |
| 283 | + "success": false, |
| 284 | + "code": "COMMON_400", |
| 285 | + "message": "잘못된 요청입니다.", |
| 286 | + "data": null |
| 287 | + } |
| 288 | + """) |
| 289 | + ) |
| 290 | + ), |
| 291 | + @ApiResponse( |
| 292 | + responseCode = "500", |
| 293 | + description = "서버 내부 오류", |
| 294 | + content = @Content( |
| 295 | + mediaType = "application/json", |
| 296 | + examples = @ExampleObject(value = """ |
| 297 | + { |
| 298 | + "success": false, |
| 299 | + "code": "COMMON_500", |
| 300 | + "message": "서버 오류가 발생했습니다.", |
| 301 | + "data": null |
| 302 | + } |
| 303 | + """) |
| 304 | + ) |
| 305 | + ) |
| 306 | + }) |
| 307 | + ResponseEntity<RsData<Void>> resendVerificationEmail( |
| 308 | + @Valid @RequestBody ResendVerificationRequest request |
| 309 | + ); |
| 310 | + |
228 | 311 | @Operation( |
229 | 312 | summary = "로그인", |
230 | 313 | description = "username + password로 로그인합니다. " + |
|
0 commit comments