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
Copy file name to clipboardExpand all lines: CLAUDE.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -195,3 +195,6 @@ race · 동시성 · timeout 처럼 일반 통합 테스트 패턴(`@Transaction
195
195
### 이유
196
196
- 라우팅(컨트롤러)과 contract(인터페이스)의 관심사를 분리해 컨트롤러가 REST 본질에 집중하게 만든다.
197
197
- example 객체화로 DTO 변경이 휴먼 에러로 example 만 어긋나는 함정을 차단한다.
198
+
199
+
### 향후 개선 여지
200
+
`*ApiExamples` 의 평문 문자열(에러 `detail`, example `name` 등) 중 본질이 도메인의 비즈니스 메시지와 같은 항목은 **contract 공유 리팩터**의 후보다. 도메인 예외(`WishException` 등)에 정적 prefix 상수를 두고 example / 실제 응답이 같은 상수를 참조하면 회귀가 컴파일러로 잡힌다. 단 응답 detail 의 보안·노이즈, 디버깅 컨텍스트 보존 같은 트레이드오프가 있어 일괄 적용 대신 케이스별로 판단한다. 더 좋은 패턴이 보이면 별도 PR 로 제안한다.
0 commit comments