Skip to content

Comments

[REFACTOR] 내 정보 변경 patch로변경 (#375)#376

Merged
lingard1234 merged 2 commits intodevfrom
refactor/375-meedit
Feb 11, 2026
Merged

[REFACTOR] 내 정보 변경 patch로변경 (#375)#376
lingard1234 merged 2 commits intodevfrom
refactor/375-meedit

Conversation

@lingard1234
Copy link
Contributor

Summary

내 정보 변경을 POST에서 PATCH로 변경

Changes

UserController

Type of Change

  • Bug fix (기존 기능에 영향을 주지 않는 버그 수정)
  • New feature (기존 기능에 영향을 주지 않는 새로운 기능 추가)
  • Breaking change (기존 기능에 영향을 주는 수정)
  • Refactoring (기능 변경 없는 코드 개선)
  • Documentation (문서 수정)
  • Chore (빌드, 설정 등 기타 변경)
  • Release (develop → main 배포)

Related Issues

참고 사항

@lingard1234 lingard1234 self-assigned this Feb 11, 2026
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @lingard1234, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 풀 리퀘스트는 UserController 내 사용자 정보 업데이트 엔드포인트를 리팩토링합니다. 주요 목표는 기존 리소스 수정을 위해 POST보다 의미론적으로 더 적절한 PATCH 메서드를 사용하여 API 설계를 RESTful 원칙에 맞추는 것입니다. 이 변경은 기능적 동작을 변경하지 않으면서 API의 명확성과 유지보수성을 향상시킵니다.

Highlights

  • HTTP 메서드 변경: 사용자 정보 수정 API 엔드포인트의 HTTP 메서드를 POST에서 PATCH로 변경했습니다.
Changelog
  • src/main/java/com/example/RealMatch/user/presentation/controller/UserController.java
    • @PostMapping 어노테이션을 @PatchMapping으로 변경했습니다.
Activity
  • 현재까지 풀 리퀘스트에 대한 활동은 없습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

이 Pull Request는 사용자 정보 업데이트 API를 POST에서 PATCH로 성공적으로 리팩토링했습니다. 이는 부분 업데이트에 대한 좋은 RESTful 관행입니다. 그러나 MyEditInfoRequestDto에서 모든 필드가 @NotBlank로 표시되어 있어, 클라이언트가 필드의 일부만 업데이트하려는 경우 유효성 검사 오류를 발생시킬 수 있는 불일치가 있습니다. 부분 업데이트를 위한 별도의 DTO 사용을 고려하여 DTO가 소비자의 요구사항에 정확히 부합하도록 하는 것이 좋습니다.

}

@PostMapping("/me/edit")
@PatchMapping("/me/edit")
Copy link
Contributor

Choose a reason for hiding this comment

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

high

@PatchMapping으로 변경된 이 엔드포인트는 부분 업데이트를 위한 RESTful한 접근 방식입니다. 그러나 이 엔드포인트에서 사용되는 MyEditInfoRequestDto의 모든 필드(nickname, address, detailAddress)에 @NotBlank 유효성 검사가 적용되어 있습니다. 이는 클라이언트가 이 필드들 중 일부만 전송하여 부분 업데이트를 시도할 경우 유효성 검사 오류를 발생시킬 수 있습니다. 만약 부분 업데이트를 허용할 의도라면, MyEditInfoRequestDto@NotBlank 어노테이션을 제거하거나, 업데이트할 필드만 포함하는 별도의 DTO를 사용하는 것을 고려해야 합니다.

References
  1. The suggestion to use a separate DTO for partial updates aligns with the principle of Rule 5, which advises against including fields in a DTO that are not currently required by a consumer. For a PATCH operation, only the fields being updated are 'required' by the consumer, making a dedicated DTO more appropriate.

@lingard1234 lingard1234 merged commit 3e96ed9 into dev Feb 11, 2026
1 check passed
@lingard1234 lingard1234 deleted the refactor/375-meedit branch February 11, 2026 12:26
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.

1 participant