Skip to content

feat: #400 큐레이션 API 프론트 피드백 반영 - #412

Open
hyorim-jo wants to merge 8 commits into
developfrom
task/#400-curation-api-fe-feedback
Open

feat: #400 큐레이션 API 프론트 피드백 반영#412
hyorim-jo wants to merge 8 commits into
developfrom
task/#400-curation-api-fe-feedback

Conversation

@hyorim-jo

@hyorim-jo hyorim-jo commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

🔗 관련 이슈

closes #400


📌 작업 내용

1️⃣ Non-Functional Requirement

  • url_normalized 컬럼을 제거했습니다. 정규화된 URL을 별도 컬럼 대신 url 컬럼에 직접 저장 (V19 마이그레이션)
  • 큐레이션 응답 변환 로직을 CurationConverter로 분리

2️⃣ Functional Requirement

  • 추천 링크 응답(RecommendedLinkResponse)에 type(INTERNAL/EXTERNAL) 필드 추가
    • 외부 추천 링크를 유저가 저장하면 userLinkuId를 채워 프론트가 "이미 저장됨"을 판별할 수 있게 함
    • 새로 뽑는 외부 추천 후보는 이미 저장한 링크를 제외
  • 큐레이션 목록/최신 조회의 썸네일을 섹션1 대표 이미지와 동일하게 통일
  • 큐레이션 API 4종(/sections, /history, /latest, /detail, /recommend-links) Swagger 문서 보강

🧪 테스트 결과

로컬 동작 확인 완료


📎 참고 사항

외부 추천은 userLinkuId 가 기본적으로 null 입니다.
추천 받은 이후 사용자가 외부 추천으로 받았던 링크를 저장하면 userLinkuId 값이 채워집니다. type은 저장 후에도 외부 추천으로 고정 됩니다.
이미 저장했던 링크는 추천 생성에서 제외하고 있습니다.

Summary by CodeRabbit

  • 새로운 기능

    • 큐레이션 섹션에 대표 이미지가 표시됩니다.
    • 추천 링크 응답에 링크 유형(내부/외부)과 카테고리 정보가 제공됩니다.
    • 외부 추천 링크가 이미 저장된 링크와 연결되어 표시됩니다.
    • 외부 추천 결과에서 접속 불가 링크와 사용자가 저장한 링크가 자동으로 제외됩니다.
    • 큐레이션 상세 응답에 멘트 준비 상태가 추가됩니다.
  • 개선 사항

    • 큐레이션 썸네일이 실제 섹션 이미지 정보를 기반으로 제공됩니다.
    • 월별 섹션 조회 시 날짜 형식 검증과 기본 월 처리가 개선되었습니다.
  • 문서화

    • 큐레이션 API 응답 필드 설명과 예시가 보강되었습니다.

@hyorim-jo hyorim-jo added this to the v1.0-Launch milestone Jul 29, 2026
@hyorim-jo
hyorim-jo requested a review from dinah05 July 29, 2026 16:30
@hyorim-jo hyorim-jo self-assigned this Jul 29, 2026
@hyorim-jo hyorim-jo added the 🗂️ 큐레이션 큐레이션 기능 관련 label Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

큐레이션 추천 링크의 내부·외부 타입과 URL 정규화 방식을 정리하고, 외부 추천 필터링·사용자 링크 매칭·섹션 이미지 기반 썸네일·응답 변환·Swagger 문서를 변경했습니다.

Changes

큐레이션 링크 타입 및 추천 흐름

Layer / File(s) Summary
링크 타입·URL 정규화
src/main/java/.../CurationLinkuType.java, src/main/java/.../CurationLinku.java, src/main/resources/db/migration/*
RECOMMENDEDINTERNAL로 변경하고 외부 URL을 url에 정규화해 저장하며 관련 컬럼과 제약조건을 마이그레이션합니다.
추천 링크 응답 조립
src/main/java/.../CurationConverter.java, src/main/java/.../RecommendedLinkResponse.java, src/main/java/.../ExternalRecommendReader.java, src/main/java/.../CurationRecommendBuilderServiceImpl.java, src/main/java/.../CurationLinkuRepository.java
추천 응답에 type과 카테고리를 포함하고, 저장된 사용자 링크의 userLinkuId를 URL 기준으로 매칭합니다.
외부 추천 후보 필터링
src/main/java/.../ExternalRecommendWorker.java, src/main/java/.../UsersLinkuRepository.java
검색 한도를 늘린 뒤 도달 가능한 URL과 미저장 링크만 남겨 이미지 처리 및 저장을 수행합니다.

큐레이션 응답 API

Layer / File(s) Summary
응답·썸네일 조립
src/main/java/.../CurationServiceImpl.java, src/main/java/.../CurationSectionInfoRepository.java, src/test/java/.../CurationServiceTest.java
섹션 1의 imageUrl을 목록·최신 응답 썸네일로 사용하고 응답 생성을 CurationConverter에 위임합니다.
API 계약 및 문서
src/main/java/.../CurationApi.java, src/main/java/.../CurationController.java, src/main/java/.../dto/curation/*
섹션 월 파라미터를 YearMonth로 변경하고 성공·오류 코드, Swagger 메타데이터, imageUrl, mentReady, type 필드를 추가합니다.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: 🗂️ 큐레이션, ✨ Feature, 🔗 링크

Suggested reviewers: dinah05, jiwonlee42

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 21.05% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 #400 큐레이션 API의 프론트 피드백 반영이라는 핵심 변경을 정확히 요약합니다.
Linked Issues check ✅ Passed 연결된 #400의 요구사항인 type 추가, 저장 링크 제외/userLinkuId 보강, 섹션1 썸네일 통일, url_normalized 제거, Swagger 보강이 모두 반영됐습니다.
Out of Scope Changes check ✅ Passed 요구사항을 지원하는 변환·리포지토리·DTO 정비로 보이며, 링크 이슈와 무관한 별도 기능 추가는 보이지 않습니다.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/#400-curation-api-fe-feedback

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@LinkYou-2025 LinkYou-2025 deleted a comment from gemini-code-assist Bot Jul 29, 2026
@github-actions

Copy link
Copy Markdown

Code Coverage

Overall Project 48.52% -0.97%
Files changed 18.27%

File Coverage
ExternalRecommendReader.java 86.61% -8.93%
CurationServiceImpl.java 81.06% -3.96% 🍏
InternalRecommendWorker.java 6.15% -7.69%
ExternalRecommendWorker.java 1.48% -29.15%
CurationController.java 0% -20.9%
CurationRecommendBuilderServiceImpl.java 0% -34.87%

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🧹 Nitpick comments (2)
src/main/java/com/umc/linkyou/service/curation/CurationServiceImpl.java (1)

90-94: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

섹션 1 이미지를 월별로 일괄 조회해 주세요.

존재하는 큐레이션마다 getSection1ImageUrl()이 별도 쿼리를 실행하므로, 목록 조회가 최대 1+12회 조회됩니다. 대상 월들의 section 1 정보를 한 번에 조회해 Map<month, imageUrl>로 변환한 뒤 응답을 조립해 주세요.

As per coding guidelines, “JPA fetch 전략을 적절히 설정하여 N+1 문제를 방지한다.”

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/com/umc/linkyou/service/curation/CurationServiceImpl.java`
around lines 90 - 94, Update the monthly response assembly in
CurationServiceImpl so section 1 image data for all target months is fetched in
one query before the loop, converted to a Map keyed by month, and reused when
building each CurationListResponse. Replace per-item getSection1ImageUrl(month)
calls with map lookups while preserving null thumbnails for months without an
existing curation.

Source: Coding guidelines

src/test/java/com/umc/linkyou/service/curation/CurationServiceTest.java (1)

183-188: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

섹션 1 썸네일 값 자체를 검증해 주세요.

현재 테스트는 "url"을 stub하지만 결과 개수만 확인합니다. 2026-03 항목의 thumbnailUrl"url"인지 검증해야 대표 이미지 변경 회귀를 잡을 수 있습니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/test/java/com/umc/linkyou/service/curation/CurationServiceTest.java`
around lines 183 - 188, CurationServiceTest의 getCurationList 검증에 2026-03 섹션 항목을
찾아 thumbnailUrl이 stub한 "url"과 일치하는지 검증을 추가하세요. 기존 결과 개수 검증은 유지하고, 섹션 1의 대표 이미지 값
자체를 확인하도록 수정하세요.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java`:
- Line 35: CurationRecommendBuilderServiceImpl 클래스에 `@Transactional`(readOnly =
true)를 적용하세요. ExternalRecommendWorker에도 클래스 레벨 기본 읽기 전용 트랜잭션을 추가하고, 저장 매핑을 수행하는
generateExternal 메서드에는 기존 메서드 레벨 `@Transactional을` 유지하세요. 대상 파일:
src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java
35-35,
src/main/java/com/umc/linkyou/service/curation/recommend/external/ExternalRecommendWorker.java
35-38.

In `@src/main/java/com/umc/linkyou/web/api/CurationApi.java`:
- Around line 52-57: CurationController#getLatestCuration의 빈 결과 계약과 Swagger 문서를
일치시키세요. 값이 없을 때의 204 No Content 응답을 `@ApiSuccessCode`(SuccessStatus._OK)와 함께 명시적으로
문서화하고, 생성된 큐레이션이 있는 경우의 200 응답 및 CurationLatestResponse 스키마는 유지하세요.

In
`@src/main/resources/db/migration/V19__drop_curation_linkus_url_normalized.sql`:
- Line 2: Update the migration before the DROP COLUMN statement to normalize all
existing curation_linkus.url values using the same normalization rules used by
the application, then remove url_normalized as currently planned. Ensure
existing external recommendation URLs are normalized in place before the column
is dropped.

---

Nitpick comments:
In `@src/main/java/com/umc/linkyou/service/curation/CurationServiceImpl.java`:
- Around line 90-94: Update the monthly response assembly in CurationServiceImpl
so section 1 image data for all target months is fetched in one query before the
loop, converted to a Map keyed by month, and reused when building each
CurationListResponse. Replace per-item getSection1ImageUrl(month) calls with map
lookups while preserving null thumbnails for months without an existing
curation.

In `@src/test/java/com/umc/linkyou/service/curation/CurationServiceTest.java`:
- Around line 183-188: CurationServiceTest의 getCurationList 검증에 2026-03 섹션 항목을
찾아 thumbnailUrl이 stub한 "url"과 일치하는지 검증을 추가하세요. 기존 결과 개수 검증은 유지하고, 섹션 1의 대표 이미지 값
자체를 확인하도록 수정하세요.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4adc8f4e-563e-41d6-9a6d-c580284c2815

📥 Commits

Reviewing files that changed from the base of the PR and between be0bd15 and 712413c.

📒 Files selected for processing (22)
  • src/main/java/com/umc/linkyou/converter/CurationConverter.java
  • src/main/java/com/umc/linkyou/domain/enums/CurationLinkuType.java
  • src/main/java/com/umc/linkyou/domain/mapping/CurationLinku.java
  • src/main/java/com/umc/linkyou/repository/UserLinkuRepository/UsersLinkuRepository.java
  • src/main/java/com/umc/linkyou/repository/curationRepository/CurationLinkuRepository.java
  • src/main/java/com/umc/linkyou/repository/curationRepository/CurationSectionInfoRepository.java
  • src/main/java/com/umc/linkyou/service/curation/CurationServiceImpl.java
  • src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java
  • src/main/java/com/umc/linkyou/service/curation/recommend/external/ExternalRecommendReader.java
  • src/main/java/com/umc/linkyou/service/curation/recommend/external/ExternalRecommendWorker.java
  • src/main/java/com/umc/linkyou/service/curation/recommend/internal/InternalRecommendWorker.java
  • src/main/java/com/umc/linkyou/service/curation/utils/ThumbnailUrlProvider.java
  • src/main/java/com/umc/linkyou/web/api/CurationApi.java
  • src/main/java/com/umc/linkyou/web/controller/CurationController.java
  • src/main/java/com/umc/linkyou/web/dto/curation/CurationDetailResponse.java
  • src/main/java/com/umc/linkyou/web/dto/curation/CurationLatestResponse.java
  • src/main/java/com/umc/linkyou/web/dto/curation/CurationListResponse.java
  • src/main/java/com/umc/linkyou/web/dto/curation/CurationSectionResponse.java
  • src/main/java/com/umc/linkyou/web/dto/curation/RecommendedLinkResponse.java
  • src/main/resources/db/migration/V18__rename_curation_linkus_type_recommended_to_internal.sql
  • src/main/resources/db/migration/V19__drop_curation_linkus_url_normalized.sql
  • src/test/java/com/umc/linkyou/service/curation/CurationServiceTest.java
💤 Files with no reviewable changes (1)
  • src/main/java/com/umc/linkyou/service/curation/utils/ThumbnailUrlProvider.java


private final CurationRepository curationRepository;
private final CurationLinkuRepository curationLinkuRepository;
private final UsersLinkuRepository usersLinkuRepository;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

for file in \
  src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java \
  src/main/java/com/umc/linkyou/service/curation/recommend/external/ExternalRecommendWorker.java
do
  echo "== $file =="
  rg -n -C2 '`@Service`|`@Transactional`' "$file"
done

Repository: LinkYou-2025/LinkU_backend

Length of output: 843


🏁 Script executed:

#!/bin/bash
set -euo pipefail

for file in \
  src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java \
  src/main/java/com/umc/linkyou/service/curation/recommend/external/ExternalRecommendWorker.java
do
  echo "== $file =="
  wc -l "$file"
  sed -n '1,140p' "$file" | cat -n
done

python3 - <<'PY'
from pathlib import Path
files = [
  Path("src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java"),
  Path("src/main/java/com/umc/linkyou/service/curation/recommend/external/ExternalRecommendWorker.java"),
]
for p in files:
    text = p.read_text()
    lines = text.splitlines()
    print(f"== {p} annotation check ==")
    for i, line in enumerate(lines, 1):
        if "`@Service`" in line or "`@Transactional`" in line:
            print(f"{i}: {line.strip()}")
    cls_line = next((i for i,l in enumerate(lines,1) if "`@Service`" in l), None)
    method_line = next((i for i,l in enumerate(lines,1) if l.startswith("    public void generateExternal") or "public void generateExternal" in l), None)
    print(f"class_line={cls_line}, generate_line={method_line}")
PY

Repository: LinkYou-2025/LinkU_backend

Length of output: 12968


서비스 기본 읽기 전용 트랜잭션을 적용하세요.

CurationRecommendBuilderServiceImpl은 전용 트랜잭션이 없어 클래스 레벨의 @Transactional(readOnly = true)를 추가하고, ExternalRecommendWorker도 클래스 레벨 기본 읽기 전용 트랜잭션을 적용한 뒤 generateExternal의 저장 매핑에만 메서드 레벨 @Transactional을 유지하세요.

📍 Affects 2 files
  • src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java#L35-L35 (this comment)
  • src/main/java/com/umc/linkyou/service/curation/recommend/external/ExternalRecommendWorker.java#L35-L38
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java`
at line 35, CurationRecommendBuilderServiceImpl 클래스에 `@Transactional`(readOnly =
true)를 적용하세요. ExternalRecommendWorker에도 클래스 레벨 기본 읽기 전용 트랜잭션을 추가하고, 저장 매핑을 수행하는
generateExternal 메서드에는 기존 메서드 레벨 `@Transactional을` 유지하세요. 대상 파일:
src/main/java/com/umc/linkyou/service/curation/recommend/CurationRecommendBuilderServiceImpl.java
35-35,
src/main/java/com/umc/linkyou/service/curation/recommend/external/ExternalRecommendWorker.java
35-38.

Source: Coding guidelines

Comment on lines +52 to +57
@Operation(summary = "가장 최근 큐레이션 조회", description = """
로그인한 사용자의 가장 최근 큐레이션 정보를 조회합니다.

- 생성된 큐레이션이 하나도 없는 경우, 204 No Content를 반환합니다.
""")
@ApiSuccessCode(SuccessStatus._OK)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== Locate files =="
fd -a 'CurationApi.java|CurationController.java|ApiResponse|ApiSuccessCode|SuccessStatus' . | sed 's#^\./##' | head -200

echo
echo "== Search relevant symbols =="
rg -n "CurationApi|getLatestCuration|ApiSuccessCode|SuccessStatus|CurationLatestResponse|ApiResponse" src/main/java || true

Repository: LinkYou-2025/LinkU_backend

Length of output: 50382


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== CurationApi.java =="
cat -n src/main/java/com/umc/linkyou/web/api/CurationApi.java | sed -n '1,120p'

echo
echo "== CurationController.java =="
cat -n src/main/java/com/umc/linkyou/web/controller/CurationController.java | sed -n '1,120p'

echo
echo "== CurationService.java =="
cat -n src/main/java/com/umc/linkyou/service/curation/CurationService.java | sed -n '1,80p'

echo
echo "== CurationServiceImpl.java getLatestCuration =="
cat -n src/main/java/com/umc/linkyou/service/curation/CurationServiceImpl.java | sed -n '90,120p'

echo
echo "== ApiResponse.java =="
cat -n src/main/java/com/umc/linkyou/apiPayload/ApiResponse.java | sed -n '1,90p'

echo
echo "== ApiSuccessCode annotation =="
cat -n src/main/java/com/umc/linkyou/validation/annotation/swagger/ApiSuccessCode.java | sed -n '1,80p'

echo
echo "== Swagger config relevant success doc generation =="
cat -n src/main/java/com/umc/linkyou/config/swagger/SwaggerConfig.java | sed -n '1,220p'

Repository: LinkYou-2025/LinkU_backend

Length of output: 25251


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== SuccessStatus.java =="
cat -n src/main/java/com/umc/linkyou/apiPayload/code/status/SuccessStatus.java | sed -n '1,80p'

echo
echo "== BaseSuccessCode.java =="
cat -n src/main/java/com/umc/linkyou/apiPayload/code/status/BaseSuccessCode.java | sed -n '1,120p'

echo
echo "== SuccessReasonDTO.java =="
cat -n src/main/java/com/umc/linkyou/apiPayload/code/SuccessReasonDTO.java | sed -n '1,120p'

echo
echo "== Other current NoContent/204 docs/usages =="
rg -n "\.noContent\(\)|204|No Content|apiSuccessCode|ApiSuccessCode" src/main/java --glob '*.java' || true

echo
echo "== Behavioral/static check of getLatestCuration mapping =="
python3 - <<'PY'
from pathlib import Path
import re

controller = Path("src/main/java/com/umc/linkyou/web/controller/CurationController.java").read_text()
m = re.search(r'`@Override`\s+public ResponseEntity<ApiResponse<CurationLatestResponse>> getLatestCuration\([^)]*\)\s*\{(?P<body>.*?)(?=\n    `@Override`|\Z)', controller, re.S)
print("controller body:")
print(m.group("body").strip() if m else "NOT FOUND")
print("contains orElse(ResponseEntity.noContent().build()):", "orElse(ResponseEntity.noContent().build())" in (m.group("body") if m else ""))

api = Path("src/main/java/com/umc/linkyou/web/api/CurationApi.java").read_text()
m = re.search(r'`@Operation`\(.*?\)\s+@ApiSuccessCode\(SuccessStatus\._OK\)\s+@GetMapping\("/latest"\)\s+ResponseEntity<ApiResponse<CurationLatestResponse>> getLatestCuration\(', api, re.S)
print("api has `@ApiSuccessCode`(SuccessStatus._OK) before /latest:")
print(bool(m))
PY

Repository: LinkYou-2025/LinkU_backend

Length of output: 1538


🏁 Script executed:

#!/bin/bash
set -eo pipefail

echo "== Swagger config continue =="
cat -n src/main/java/com/umc/linkyou/config/swagger/SwaggerConfig.java | sed -n '220,320p'

echo
echo "== Other current NoContent/204 docs/usages/statements =="
rg -n "\.noContent\(\)|204|No Content|apiSuccessCode|ApiSuccessCode" src/main/java --glob '*.java' || true

echo
echo "== Behavioral/static check of getLatestCuration mapping =="
python3 - <<'PY'
from pathlib import Path
import re

controller = Path("src/main/java/com/umc/linkyou/web/controller/CurationController.java").read_text()
m = re.search(r'`@Override`\s+public ResponseEntity<ApiResponse<CurationLatestResponse>> getLatestCuration\([^)]*\)\s*\{(?P<body>.*?)(?=\n    `@Override`|\Z)', controller, re.S)
if not m:
    print("CONTROLLER_MATCH=NOT_FOUND")
else:
    body = m.group("body")
    print("CONTROLLER_MATCH=" + ("FOUND" if "orElse(ResponseEntity.noContent().build())" in body else "FOUND_NO_BODY_MATCH"))
    print("contains_orElse_noContent_True=" + ("True" if "orElse(ResponseEntity.noContent().build())" in body else "False"))
    print("returns_200_for_present_body=" + ("True" if "map(body -> ResponseEntity.ok(ApiResponse.onSuccess(body)))" in body else "False"))

api = Path("src/main/java/com/umc/linkyou/web/api/CurationApi.java").read_text()
api_ok_method = re.search(r'`@ApiSuccessCode`\(SuccessStatus\._OK\)\s+@GetMapping\("/latest"\)\s+ResponseEntity<ApiResponse<CurationLatestResponse>> getLatestCuration\(', api, re.S)
print("api_uses_Projected_StatusCode_for_204=False")
print("api_documented_204_in_description=" + ("True" if bool(api_ok_method) and "204 No Content" in api[api.find(api_ok_method.group(0), 4000) if api_ok_method else len(api):] else "False"))
print("api_has_@ApiSuccessCode_SucccessStatus_OK_before_/latest=" + ("True" if bool(api_ok_method) else "False"))
PY

Repository: LinkYou-2025/LinkU_backend

Length of output: 7920


/latest의 204 응답을 Swagger 응답에 반영해 주세요.

CurationController#getLatestCuration은 값이 없을 때 ResponseEntity.noContent().build()를 반환하지만, Swagger 성공 응답은 @ApiSuccessCode(SuccessStatus._OK)로 아직 생성 결과도 포함된 200 응답만 문서화합니다. 204 No Content를 명시적으로 문서화하거나, 빈 결과도 ApiResponse<CurationLatestResponse> 결과로 바꿔 클라이언트 계약과 응답 계약을 맞춰 주세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/main/java/com/umc/linkyou/web/api/CurationApi.java` around lines 52 - 57,
CurationController#getLatestCuration의 빈 결과 계약과 Swagger 문서를 일치시키세요. 값이 없을 때의 204
No Content 응답을 `@ApiSuccessCode`(SuccessStatus._OK)와 함께 명시적으로 문서화하고, 생성된 큐레이션이 있는
경우의 200 응답 및 CurationLatestResponse 스키마는 유지하세요.

Source: Coding guidelines

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

Labels

🗂️ 큐레이션 큐레이션 기능 관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] 프론트 피드백 기반 큐레이션 API 수정

1 participant