Skip to content

Commit

Permalink
✨ Feat: 스웨거 설명 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ShimFFF committed Aug 18, 2024
1 parent bcf95f8 commit 7f0e01b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/gaji/service/domain/user/entity/User.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ public class User extends BaseEntity {

@Enumerated(EnumType.STRING)
private ServiceRole role;

private String profileImagePth;

private String usernameId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
import gaji.service.domain.user.web.dto.UserResponseDTO;
import gaji.service.global.base.BaseResponse;
import gaji.service.jwt.service.TokenProviderService;
import io.swagger.v3.oas.annotations.Operation;
import jakarta.validation.Valid;
import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Slice;
Expand All @@ -28,6 +29,7 @@ public class UserRestController {
private final TokenProviderService tokenProviderService;

@PutMapping("/")
@Operation(summary = "회원 탈퇴 API", description = "회원 탈퇴 API")
public BaseResponse<UserResponseDTO.CancleResultDTO> cancle(@RequestHeader("Authorization") String authorizationHeader) {

Long userId = tokenProviderService.getUserIdFromToken(authorizationHeader);
Expand All @@ -37,6 +39,7 @@ public BaseResponse<UserResponseDTO.CancleResultDTO> cancle(@RequestHeader("Auth


@PutMapping("/nicknames/{userId}")
@Operation(summary = "닉네임 변경 API", description = "닉네임 변경 API")
public BaseResponse<UserResponseDTO.UpdateNicknameResultDTO> updateNickname(@RequestHeader("Authorization") String authorizationHeader,
@PathVariable("userId") Long userIdFromPathVariable,
@RequestBody @Valid UserRequestDTO.UpdateNicknameDTO request) {
Expand All @@ -48,6 +51,7 @@ public BaseResponse<UserResponseDTO.UpdateNicknameResultDTO> updateNickname(@Req
}

@GetMapping("/rooms")
@Operation(summary = "내 방 목록 조회 API", description = "내 방 목록 조회 API")
public BaseResponse<UserResponseDTO.GetRoomListDTO> getMyRoomList(@RequestHeader("Authorization") String authorizationHeader,
@RequestParam(value = "cursorDate",required = false) LocalDate cursorDate,
@RequestParam(value = "cursorId",required = false) Long cursorId,
Expand All @@ -59,6 +63,7 @@ public BaseResponse<UserResponseDTO.GetRoomListDTO> getMyRoomList(@RequestHeader
}

@GetMapping("/rooms/{userId}")
@Operation(summary = "유저 방 목록 조회 API", description = "유저 방 목록 조회 API")
public BaseResponse<UserResponseDTO.GetRoomListDTO> getUserRoomList(@PathVariable Long userId,
@RequestParam(value = "cursorDate",required = false) LocalDate cursorDate,
@RequestParam(value = "cursorId",required = false) Long cursorId,
Expand All @@ -69,6 +74,7 @@ public BaseResponse<UserResponseDTO.GetRoomListDTO> getUserRoomList(@PathVariabl
}

@GetMapping("/{userId}")
@Operation(summary = "유저 상세 조회 API", description = "유저 상세 조회 API")
public BaseResponse<UserResponseDTO.GetUserDetailDTO> getUserDetail(@RequestHeader(value = "Authorization", required = false) String authorizationHeader,
@PathVariable("userId") Long userId) {

Expand All @@ -77,6 +83,7 @@ public BaseResponse<UserResponseDTO.GetUserDetailDTO> getUserDetail(@RequestHead
}

@GetMapping("/posts/{userId}")
@Operation(summary = "유저 게시글 목록 조회 API", description = "유저 게시글 목록 조회 API")
public BaseResponse<UserResponseDTO.GetPostListDTO> getUserPostList(@PathVariable Long userId,
@RequestParam(value = "cursorDate",required = false) LocalDateTime cursorDateTime,
@RequestParam(value = "type", required = false) PostTypeEnum type,
Expand Down

0 comments on commit 7f0e01b

Please sign in to comment.