Skip to content

[FEAT]: 전체 문서 제목 조회 API 응답 필드 추가 - #170

Merged
poketopa merged 6 commits into
developfrom
feat/169
Jul 17, 2026
Merged

[FEAT]: 전체 문서 제목 조회 API 응답 필드 추가#170
poketopa merged 6 commits into
developfrom
feat/169

Conversation

@jyt6640

@jyt6640 jyt6640 commented Jul 8, 2026

Copy link
Copy Markdown
Member

작업 내용

  • 전체 문서 제목 조회 API 응답 필드를 추가.

    • documentType
    • generateTime
  • DocumentTitleListResponse에 문서 타입과 생성 시간 필드를 추가.

  • 문서 상속 구분 컬럼인 dtype을 읽기 전용 필드로 매핑.

  • 전체 문서 제목 조회 쿼리에서 필요한 필드만 조회하도록 수정.

    • title
    • uuid
    • documentType
    • generateTime

@gemini-code-assist

Copy link
Copy Markdown

Summary of Changes

Hello, 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!

이 PR은 전체 문서 제목 조회 API의 응답 데이터 구성을 개선하는 작업을 수행합니다. 기존의 제목과 UUID만 반환하던 구조에서 문서 타입과 생성 시간을 포함하도록 확장하였으며, 이에 맞춰 데이터베이스 쿼리와 엔티티 매핑을 최적화하여 필요한 데이터만 효율적으로 조회할 수 있도록 변경하였습니다.

Highlights

  • API 응답 필드 확장: 전체 문서 제목 조회 API 응답 DTO에 'documentType'과 'generateTime' 필드를 추가하여 더 상세한 정보를 제공합니다.
  • 데이터베이스 매핑 최적화: Document 엔티티에 'dtype' 필드를 읽기 전용으로 매핑하고, 조회 쿼리에서 필요한 필드만 선택하도록 수정하여 성능을 개선했습니다.
  • 테스트 코드 업데이트: 변경된 API 응답 구조에 맞춰 테스트 케이스를 수정하고, 새로운 필드들에 대한 검증 로직을 추가했습니다.
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 the 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 counterproductive. 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.

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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the document title list retrieval to include the document type and generation time. It maps the dtype field in the Document entity, updates the DocumentTitleListResponse DTO, and modifies the repository query to fetch these new fields. The review feedback suggests mapping the dtype field in Document directly as a DocumentType enum using @Enumerated(EnumType.STRING). This improvement would enhance type safety and allow the removal of the secondary constructor in DocumentTitleListResponse that manually parses the string representation of the enum.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment on lines +50 to +51
@Column(name = "dtype", insertable = false, updatable = false)
private String dtype;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

dtype 필드를 String 대신 DocumentType enum 타입으로 직접 매핑하면 타입 안정성을 높이고 불필요한 타입 변환 로직을 제거할 수 있습니다.

@Enumerated(EnumType.STRING) 어노테이션을 사용하여 DocumentType으로 매핑하면, DocumentTitleListResponse에서 String을 받아 DocumentType.valueOf()로 변환하는 부 생성자를 제거할 수 있어 코드가 훨씬 깔끔해집니다.

Suggested change
@Column(name = "dtype", insertable = false, updatable = false)
private String dtype;
@jakarta.persistence.Enumerated(jakarta.persistence.EnumType.STRING)
@Column(name = "dtype", insertable = false, updatable = false)
private DocumentType dtype;

Comment on lines +14 to +21
public DocumentTitleListResponse(
String title,
UUID uuid,
String documentType,
LocalDateTime generateTime
) {
this(title, uuid, DocumentType.valueOf(documentType), generateTime);
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

medium

Document 엔티티의 dtype 필드를 DocumentType enum 타입으로 직접 매핑하면, JPQL 조회 시 DocumentType 타입으로 바로 조회되므로 이 부 생성자(String을 받는 생성자)가 더 이상 필요하지 않습니다. 이를 제거하여 레코드의 단순함과 깔끔함을 유지할 수 있습니다.

Comment on lines +9 to +13
}
} No newline at end of file

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

EOF 개행 넣으면 좋을 것 같아요~

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

넵 감사합니다~

반영했습니다 !

@poketopa
poketopa merged commit 7526666 into develop Jul 17, 2026
1 check passed
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.

2 participants