Skip to content

5주차 미션 [빈]#12

Open
deli-minju wants to merge 3 commits into
mainfrom
bean/week5
Open

5주차 미션 [빈]#12
deli-minju wants to merge 3 commits into
mainfrom
bean/week5

Conversation

@deli-minju
Copy link
Copy Markdown
Collaborator

🚩 관련 이슈

📌 구현 결과

  • 공통 응답 처리 & 예외 처리 객체 구현
  • API 명세 기반 Controller, DTO 작성
  • Test API 구현
POST /api/v1/users/me 성공 응답
요청
응답
GET /api/v1/test/health 성공 응답
요청
응답

❓ 리뷰 요청

🤔 질문

💬 기타 공유 사항

  • POST /api/v1/users/me는 5주차 범위(Controller/DTO 중심)에 맞춰 더미 응답으로 구현했습니다.
  • 실제 DB 조회/비즈니스 로직 연동은 Service, Repository 부분에서 반영 예정입니다.

@deli-minju deli-minju self-assigned this Apr 29, 2026
@seoyoon127
Copy link
Copy Markdown
Collaborator

수고하셨습니다!

Copy link
Copy Markdown
Member

@yangjiae12 yangjiae12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!

Comment on lines +20 to +23
@PostMapping("/me")
public ResponseEntity<ApiResponse<MemberResDto.GetMyPageResponse>> getMyPage(
@Valid @RequestBody MemberReqDto.GetMyPageRequest request
) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

컨트롤러에 Swagger 명세를 추가해 주시면 좋을 것 같습니다!

Comment on lines +12 to +19
public record Create(
@NotBlank @Size(max = 20) String name,
@NotNull Gender gender,
@NotNull LocalDate birthDate,
@NotBlank @Size(max = 255) String address,
@NotBlank @Size(max = 20) String nickname
) {
}
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가로 각 필드마다 @Schema(description = "...", example = "...")를 추가해서 설명과 예시값을 넣어주시면 좋을 것 같습니다. 특히 birthDate나 gender 같은 필드는 스웨거에 예시값이 있으면 데이터 형식을 파악하기 훨씬 수월할 것 같아요!

Comment on lines +13 to +14
MEMBER_NOT_FOUND(HttpStatus.NOT_FOUND, "MEMBER404", "사용자를 찾을 수 없습니다."),
STORE_NOT_FOUND(HttpStatus.NOT_FOUND, "STORE404", "가게를 찾을 수 없습니다.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재 ReviewErrorCode나 MissionErrorCode를 보면, 다른 도메인의 리소스인 MEMBER_NOT_FOUND나 STORE_NOT_FOUND가 중복으로 정의되어 있습니다. 에러 관리의 일관성을 위해 해당 리소스의 메인 도메인 Enum에서만 에러를 정의하고 이를 재사용하는 방식을 권장합니다!

@Getter
@RequiredArgsConstructor
public enum MemberErrorCode implements BaseErrorCode {
MEMBER_NOT_FOUND(HttpStatus.NOT_FOUND, "MEMBER404", "사용자를 찾을 수 없습니다.");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

현재의 MEMBER404 방식은 동일한 HTTP 상태 코드를 가진 여러 에러를 표현하기에 한계가 있습니다! 이를 방지하기 위해 MEMBER404_1처럼 구체적인 인덱스를 부여하는 방식으로 수정하면 좋을 것 같아요.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Mission] 5주차 미션

3 participants