Skip to content

Commit

Permalink
[fix] : Swagger description fix
Browse files Browse the repository at this point in the history
  • Loading branch information
realisshomyang committed Feb 5, 2024
1 parent 97ad248 commit 36bae4e
Showing 1 changed file with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@

import com.onnoff.onnoff.apiPayload.ApiResponse;
import com.onnoff.onnoff.auth.UserContext;
import com.onnoff.onnoff.domain.on.resolution.converter.ResolutionConverter;
import com.onnoff.onnoff.domain.user.converter.UserConverter;
import com.onnoff.onnoff.domain.user.dto.EnumInquiryResponseDTO;
import com.onnoff.onnoff.domain.user.dto.UserRequestDTO;
import com.onnoff.onnoff.domain.user.dto.UserResponseDTO;
import com.onnoff.onnoff.domain.user.service.UserService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/users")
Expand All @@ -20,17 +19,20 @@ public class UserController {
private final UserService userService;

@GetMapping("/information")
public ApiResponse getUserInformation(){
@Operation(summary = "마이페이지 유저 정보 조회 API",description = "마이페이지의 유저 정보를 가져오는 API 입니다.")
public ApiResponse<UserResponseDTO.UserInformationResponseDTO> getUserInformation(){
return ApiResponse.onSuccess(UserConverter.toUserInformationResponseDTO(UserContext.getUser()));
}

@PutMapping("/withdraw")
public ApiResponse withdrawUser(){
@Operation(summary = "회원 탈퇴 API",description = "유저 회원 탈퇴 API입니다(SOFT DELETE)")
public ApiResponse<UserResponseDTO.UserDetailDTO> withdrawUser(){
return ApiResponse.onSuccess(UserConverter.toUserDetailDTO(userService.withdrawUser()));
}

@PutMapping("/")
public ApiResponse modifyUser(@RequestBody UserRequestDTO.ModifyUserDTO modifyUserDTO) {
@Operation(summary = "회원 정보 수정 API" , description = "회원 정보 수정 API입니다.")
public ApiResponse<UserResponseDTO.UserDetailDTO> modifyUser(@RequestBody UserRequestDTO.ModifyUserDTO modifyUserDTO) {
return ApiResponse.onSuccess(UserConverter.toUserDetailDTO(userService.modifyUser(modifyUserDTO)));
}
}

0 comments on commit 36bae4e

Please sign in to comment.