-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from Interviewmate/feature/sign-up
회원 가입 API Swagger 반영
- Loading branch information
Showing
3 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
25 changes: 25 additions & 0 deletions
25
src/main/java/org/interviewmate/domain/user/api/UserApiController.java
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,25 @@ | ||
package org.interviewmate.domain.user.api; | ||
|
||
import io.swagger.v3.oas.annotations.Operation; | ||
import io.swagger.v3.oas.annotations.tags.Tag; | ||
import lombok.RequiredArgsConstructor; | ||
import org.interviewmate.domain.user.dto.PostUserReq; | ||
import org.interviewmate.domain.user.dto.PostUserRes; | ||
import org.springframework.web.bind.annotation.PostMapping; | ||
import org.springframework.web.bind.annotation.RequestBody; | ||
import org.springframework.web.bind.annotation.RequestMapping; | ||
import org.springframework.web.bind.annotation.RestController; | ||
|
||
@Tag(name = "유저 관련 API") | ||
@RestController | ||
@RequestMapping("/users") | ||
@RequiredArgsConstructor | ||
public class UserApiController { | ||
|
||
@Operation(summary = "회원 가입 API", description = "필요한 정보를 받아 회원 가입 진행") | ||
@PostMapping("/sign-up") | ||
public PostUserRes signUp(@RequestBody PostUserReq postUserReq) { | ||
return null; | ||
} | ||
|
||
} |
25 changes: 25 additions & 0 deletions
25
src/main/java/org/interviewmate/domain/user/dto/PostUserReq.java
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,25 @@ | ||
package org.interviewmate.domain.user.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import java.util.List; | ||
import lombok.Getter; | ||
|
||
@Schema(name = "회원 가입 Request", description = "회원 가입에 필요한 유저에 대한 정보") | ||
@Getter | ||
public class PostUserReq { | ||
|
||
@Schema(description = "이메일", example = "[email protected]") | ||
private String email; | ||
@Schema(description = "비밀번호", example = "Moamoa0302!") | ||
private String password; | ||
|
||
@Schema(description = "닉네임", example = "모아모아뀽") | ||
private String nickName; | ||
|
||
@Schema(description = "직무", example = "서버 개발자") | ||
private String job; | ||
|
||
@Schema(description = "키워드", example = "{Spring, JPA, Java}") | ||
private List<String> keyword; | ||
|
||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/org/interviewmate/domain/user/dto/PostUserRes.java
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,17 @@ | ||
package org.interviewmate.domain.user.dto; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.Getter; | ||
|
||
@Schema(name = "회원 가입 Response", description = "회원 가입을 완료한 유저에 대한 정보") | ||
@Getter | ||
public class PostUserRes { | ||
|
||
@Schema(description = "유저 식별자", example = "1") | ||
private Long userId; | ||
@Schema(description = "이메일", example = "[email protected]") | ||
private String email; | ||
@Schema(description = "비밀번호", example = "Moamoa0302!") | ||
private String password; | ||
|
||
} |