Skip to content

[REFACTOR] 문서 목록 조회의 응답 DTO 변환 경계 정리 - #192

Open
poketopa wants to merge 2 commits into
developfrom
refactor/191
Open

[REFACTOR] 문서 목록 조회의 응답 DTO 변환 경계 정리#192
poketopa wants to merge 2 commits into
developfrom
refactor/191

Conversation

@poketopa

@poketopa poketopa commented Aug 4, 2026

Copy link
Copy Markdown
Member

관련 이슈

Closes #191

변경 배경

DocumentService.findAll()만 문서 도메인 엔티티인 Page<Document>를 컨트롤러에 반환하고, 컨트롤러에서 DocumentListResponse로 변환하고 있었다.

프로젝트의 다른 조회 서비스처럼 응답 DTO 변환 책임을 서비스 계층에 두어 도메인 엔티티가 컨트롤러 경계로 노출되지 않도록 정리

변경 내용

  • GET /document의 기존 페이지 및 문서 응답 계약을 컨트롤러 회귀 테스트로 고정
  • DocumentService.findAll()Page<DocumentListResponse>를 반환하도록 변경
  • DocumentController에서 Document 의존과 목록 DTO 변환 제거
  • 서비스 테스트의 반환 타입을 응답 DTO로 변경하고 제목·UUID 매핑 검증 추가

@poketopa
poketopa marked this pull request as ready for review August 4, 2026 23:15
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