Skip to content

Commit

Permalink
chore: swagger event 명세 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
parkdaye committed Aug 14, 2023
1 parent 4de4119 commit f3f4b6f
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,23 +42,32 @@ public ResponseEntity<TeamBuildingResponse> createTeamBuilding(
return ResponseEntity.ok(teamBuildingService.createTeamBuilding(teamBuildingRequest));
}

@Operation(summary = "조정 단계 팀원 수정 (단일 유저) ", description = "운영진이 조정단계에서 조정할 때 사용합니다. ")
@Operation(summary = "팀원 조정 (단일 유저) ", description = """
운영진이 조정 단계에서 팀원을 조정합니다. \s
event : adjust-user, data : UserInfo.class \s
""")
@PostMapping("/{teamBuildingUuid}/users/{userUuid}")
public ResponseEntity<UserInfo> adjustUser(@PathVariable(value = "teamBuildingUuid") String teamBuildingUuid,
@PathVariable(value = "userUuid") String userUuid, @RequestBody @Valid UserAdjustRequest userAdjustRequest) {
return ResponseEntity.ok(
teamBuildingService.adjustUser(teamBuildingUuid, userUuid, userAdjustRequest.getTeamUuid()));
}

@Operation(summary = "팀원 삭제 (단일 유저) ", description = "운영진이 팀원 조정할 때 사용합니다. ")
@Operation(summary = "팀원 삭제 (단일 유저) ", description = """
운영진이 팀원을 삭제합니다. \s
event : delete-user, data : userUuid
""")
@DeleteMapping("/{teamBuildingUuid}/users/{userUuid}")
public ResponseEntity<Void> deleteUser(@PathVariable(value = "teamBuildingUuid") String teamBuildingUuid,
@PathVariable(value = "userUuid") String userUuid) {
userService.deleteUser(teamBuildingUuid, userUuid);
return ResponseEntity.ok().build();
}

@Operation(summary = "팀 빌딩 마치기", description = "운영진이 조정 단계에서 팀빌딩을 마칩니다.")
@Operation(summary = "팀 빌딩 마치기", description = """
운영진이 조정 단계에서 팀빌딩을 마칩니다. \s
event : finish-team-building, data : RoundStatus(COMPLETE) \s
""")
@PutMapping("/{teamBuildingUuid}/finish")
public ResponseEntity<Void> finishTeamBuilding(@PathVariable(value = "teamBuildingUuid") String teamBuildingUuid) {
teamBuildingService.finishTeamBuilding(teamBuildingUuid);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ public ResponseEntity<TeamBuildingResponse> findTeamBuilding(
}


@Operation(summary = "팀 빌딩 팀원 선택 요청", description = "PM이 지망 별 팀원 선택을 할 때 사용합니다. ")
@Operation(summary = "팀 빌딩 팀원 선택 요청", description = """
PM이 지망 별 팀원 선택을 할 때 사용합니다. \s
event : pick-user, data : {"teamUuid" : "string", "teamName" : "string", "pickUserUuids" : ["string1", "string2"]} \s
event : change-round, data : RoundStatus(FIRST_ROUND, ADJUSTED_ROUND...)
""")
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UserPickResponse.class)))
@ApiResponse(responseCode = "400", description = "BAD REQUEST", content = @Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class)))
@PostMapping("/{teamBuildingUuid}/teams/{teamUuid}/users")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ public class UserSurveyController {
private final UserService userService;
private final TeamBuildingService teamBuildingService;

@Operation(summary = "회원 생성 요청", description = "회원이 생성됩니다.")
@Operation(summary = "회원 생성 요청", description = """
회원이 생성됩니다. \s
event : create-user, data : UserInfo.class""")
@ApiResponse(responseCode = "200", description = "OK", content = @Content(schema = @Schema(implementation = UserInfo.class)))
@ApiResponse(responseCode = "400", description = "BAD REQUEST", content = {
@Content(mediaType = "application/json", schema = @Schema(implementation = ExceptionResponse.class))})
Expand Down

0 comments on commit f3f4b6f

Please sign in to comment.