You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
refactor/#123-official: 프로젝트 링크·멤버 역할 응답을 레거시 형식에 맞춤 - #124
멤버 역할: 레거시처럼 enum 이름 → 표시명 순서로 대소문자 무시로 찾고, 없으면 null로 두며 warn 로그를 남깁니다.
PR Point 📸
레거시와 동작이 다른 부분이 있습니다. 레거시는 알 수 없는 값이 오면 예외를 던져 조회 전체가 실패하지만, 이 PR은 기존 신규 API의 동작을 유지합니다.
알 수 없는 링크 종류는 website로 응답합니다.
알 수 없는 멤버 역할은 "role": null로 응답합니다.
기존에는 링크 종류를 대소문자까지 정확히 비교해서 GitHub 같은 값이 WEBSITE로 바뀌었고, 멤버 역할은 enum 이름만 받아서 design, 디자이너 같은 값이 null이 됐습니다. 둘 다 레거시와 같은 매칭으로 고쳤습니다. Playground는 역할을 검증 없이 문자열로 저장합니다(ProjectSaveRequest.java:60).
응답 필드명과 값이 바뀌므로, 신규 API를 이미 쓰는 클라이언트가 있다면 영향을 받습니다. 저장소 안에서는 해당 소비자를 찾지 못했습니다.
이 PR로 맞춘 것은 링크·멤버 역할뿐입니다. FE 전환 시 아래 차이는 남아 있습니다.
BaseResponse 래핑
목록 페이지네이션 필드(totalPage, hasNextPage 등). 공식 채널 API 전체(review, soptstory, project) 형식이라 팀 논의 후 결정합니다.
No actionable comments were generated in the recent review.
Summary by CodeRabbit
변경 사항
프로젝트 목록 및 상세 정보의 링크가 제목과 주소로 제공됩니다.
멤버 역할이 화면 표시용 이름과 설명으로 제공되며, 역할 정보가 없는 경우 이를 반영합니다.
알 수 없거나 값이 없는 링크 종류는 웹사이트 링크로 처리됩니다.
테스트
프로젝트 링크와 멤버 역할 응답 및 링크 종류 변환을 확인하는 테스트를 추가했습니다.
Walkthrough
프로젝트 링크 종류를 문자열 값으로 변환합니다. 프로젝트 응답은 링크를 title·url로, 멤버 역할을 표시용 문자열로 반환합니다. 목록과 상세 응답, 외부 링크 종류 변환을 확인하는 테스트를 추가합니다.
Changes
프로젝트 응답 형식 조정
Layer / File(s)
Summary
링크 종류 값과 외부 데이터 변환 domain/domain-official/src/main/java/org/sopt/makers/domain/official/project/type/ProjectLinkType.java, domain/domain-official/src/main/java/org/sopt/makers/domain/official/project/adapter/PlaygroundInternalProjectAdapter.java, domain/domain-official/src/test/java/org/sopt/makers/domain/official/project/adapter/PlaygroundInternalProjectAdapterTest.java
ProjectLinkType에 문자열 값을 추가하고, 외부 프로젝트 링크 제목을 fromValue로 변환합니다. 알 수 없거나 null인 값은 WEBSITE로 변환하며, 이 동작을 테스트합니다.
Project responses now return links as title and url and member roles as display names, matching the legacy format. No actionable merge risk was found.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
PR 제목은 링크 응답 형식과 멤버 역할 응답을 레거시 형식에 맞춘다는 주요 변경을 설명합니다. 제목 형식(type/#이슈번호-서비스: 내용)도 템플릿과 일치합니다. 변경 내용(ProjectResponse, ProjectLinkType, ProjectMemberRole, 어댑터, 테스트)과 관련이 있습니다.
Linked Issues check
[#123] 요구사항은 세 가지입니다. (1) 링크를 title/url과 레거시 값으로 응답, (2) 멤버 역할을 표시용 역할명으로 응답, (3) 응답 형식 테스트 추가입니다.
변경 파일은 모두 링크·멤버 역할 응답 형식 변경과 이를 지원하는 코드입니다. 구체적으로 ProjectLinkType/ProjectMemberRole의 값 추가, ProjectResponse DTO 변경, PlaygroundInternalProjectAdapter의 parseLinkType 대체, 그리고 관련 테스트입니다. 대소문자 무시 …
Description check
PR 설명은 템플릿의 주요 섹션(Related Issue, Work Description, PR Point)을 모두 채웠습니다. 이슈 번호(#123), 변경 내용(링크·멤버 역할 응답 형식 변경), 레거시와의 차이, 미해결 항목(BaseResponse 래핑, 페이지네이션 필드), 테스트 결과(./gradlew clean build 통과)가 구체적으로 적혀 …
Full details: Linked Issues check
Explanation
[#123] 요구사항은 세 가지입니다. (1) 링크를 title/url과 레거시 값으로 응답, (2) 멤버 역할을 표시용 역할명으로 응답, (3) 응답 형식 테스트 추가입니다.
(1) 충족: ProjectResponse.LinkItem(String title, String url)이 LinkItem.of로 ProjectLinkType.getValue()를 title에 넣습니다. ProjectLinkType 값은 website, googlePlay, appStore, github, media, instagram입니다. 목록과 상세 응답 모두 이 팩터리를 사용합니다.
(2) 충족: MemberItem.of가 ProjectMemberRole.getDescription()을 role에 넣습니다. DESIGN은 디자이너, SERVER는 서버 개발자로 매핑됩니다.
(3) 요약상 ProjectControllerTest에 링크 title/url, 멤버 역할 표시명, 설명 검증 테스트가 추가되었습니다. 어댑터 테스트에는 링크 종류 변환 케이스가 추가되었습니다. 테스트 파일 내용은 직접 확인하지 않았으나 요약 근거는 일치합니다.
변경 파일은 모두 링크·멤버 역할 응답 형식 변경과 이를 지원하는 코드입니다. 구체적으로 ProjectLinkType/ProjectMemberRole의 값 추가, ProjectResponse DTO 변경, PlaygroundInternalProjectAdapter의 parseLinkType 대체, 그리고 관련 테스트입니다. 대소문자 무시 매칭과 알 수 없는 값의 처리(링크는 website, 역할은 null)도 링크 종류 매핑 변경의 일부입니다. PR 설명에 근거가 있으며 이슈 범위와 충돌하지 않습니다. 페이지네이션 변경은 PR에서 제외되었으므로 범위 위반이 없습니다.
Full details: Description check
Explanation
PR 설명은 템플릿의 주요 섹션(Related Issue, Work Description, PR Point)을 모두 채웠습니다. 이슈 번호(#123), 변경 내용(링크·멤버 역할 응답 형식 변경), 레거시와의 차이, 미해결 항목(BaseResponse 래핑, 페이지네이션 필드), 테스트 결과(./gradlew clean build 통과)가 구체적으로 적혀 있습니다. 템플릿의 체크 항목 일부(리뷰어, 라벨 추가 여부 등)는 설명에 언급되지 않았지만, 이는 비핵심 항목입니다.
Finishing Touches
Generate unit tests (beta)
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue 🚀
sopt.org-backend-springLinkType,Role(@JsonValue직렬화,fromValue매칭)Work Description ✏️
{ "linkType": "GOOGLE_PLAYSTORE", "linkUrl": "..." }→{ "title": "googlePlay", "url": "..." }"DESIGN"→"디자이너","SERVER"→"서버 개발자"등 (레거시Role과 동일)ProjectLinkType에value,ProjectMemberRole에description을 두고, 응답 DTO에서 문자열로 꺼냅니다. 표시값을 DTO에서 꺼내는 방식은AlarmStatus와 같고, domain이 Jackson에 의존하지 않습니다.fromValue는Optional을 반환해 판정만 하고, 기본값 처리와 로그는 Adapter가 맡습니다. (CategoryType.fromSafely와 같은 방식)WEBSITE로 대체하며warn로그를 남깁니다.null로 두며warn로그를 남깁니다.PR Point 📸
website로 응답합니다."role": null로 응답합니다.GitHub같은 값이WEBSITE로 바뀌었고, 멤버 역할은 enum 이름만 받아서design,디자이너같은 값이null이 됐습니다. 둘 다 레거시와 같은 매칭으로 고쳤습니다. Playground는 역할을 검증 없이 문자열로 저장합니다(ProjectSaveRequest.java:60).BaseResponse래핑totalPage,hasNextPage등). 공식 채널 API 전체(review, soptstory, project) 형식이라 팀 논의 후 결정합니다.detail,category형태. 현재 FE는 두 필드를 쓰지 않습니다../gradlew clean build통과title/url,role표시명·null)