feat: enchant fullname api 접두접미 요청 파라미터 추가#105
Conversation
✅ 테스트 결과 for PRBuild: success 🧪 테스트 실행 with Gradle |
There was a problem hiding this comment.
Pull request overview
This PR enhances the enchant information API and adds enchant search functionality to auction queries. The main purpose is to prevent returning excessive data by adding an optional affix_position filter parameter to the enchant fullname endpoint, and to enable searching for items by their enchant prefix/suffix values in both auction history and real-time auction queries.
Changes:
- Added optional
affix_positionparameter to the enchant fullname API endpoint to filter by prefix (접두) or suffix (접미) - Introduced
EnchantSearchRequestDTO to support enchant-based filtering in auction searches - Implemented QueryDSL-based enchant search logic for both auction history and real-time auction queries
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| EnchantInfoController.java | Added affix_position request parameter to getAllEnchantFullnames endpoint with OpenAPI documentation |
| EnchantInfoService.java | Added validation logic for affix_position parameter and routing to appropriate repository method |
| EnchantInfoRepositoryPort.java | Added new interface method for filtering by affix position |
| EnchantInfoRepositoryPortImpl.java | Implemented the new repository method |
| EnchantInfoJpaRepository.java | Added JPQL query to filter enchants by affix position |
| EnchantInfoExceptionCode.java | New exception code enum for invalid affix_position values |
| EnchantSearchRequest.java | New DTO for enchant search criteria with prefix and suffix fields |
| AuctionHistorySearchRequest.java | Added enchantSearchRequest field to support enchant filtering |
| AuctionRealtimeSearchRequest.java | Added enchantSearchRequest field to support enchant filtering |
| AuctionHistoryQueryDslRepository.java | Implemented QueryDSL logic to filter by enchant prefix/suffix using subqueries |
| AuctionRealtimeQueryDslRepository.java | Implemented QueryDSL logic to filter by enchant prefix/suffix using subqueries |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| public List<String> findAllFullnames() { | ||
| public List<String> findAllFullnames(String affixPosition) { | ||
| if (affixPosition != null) { |
There was a problem hiding this comment.
The validation should also check for blank strings. Following the codebase convention seen in AuctionHistoryQueryDslRepository and AuctionRealtimeQueryDslRepository, string parameters should be validated with both null and isBlank() checks. A blank string (e.g., empty or whitespace-only) should be treated the same as null and return all enchants rather than throwing an exception.
| if (affixPosition != null) { | |
| if (affixPosition != null && !affixPosition.isBlank()) { |
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
📋 상세 설명
📊 체크리스트