-
Notifications
You must be signed in to change notification settings - Fork 0
[NO-ISSUE] 검색 문서 수정 #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7aee8f1 to
9f5a635
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR updates search documentation by adding comprehensive REST Docs test cases for the location search API and refactoring pagination response handling to use a standardized PageInfo structure across different endpoints.
Key Changes:
- Added new
SearchControllerTest.javawith test cases documenting search API behavior for Korean/English city names, country names, multiple keywords, empty keywords, and no-results scenarios - Refactored pagination from custom
PaginationInfoto sharedPageInfoclass inMySouvenirListResponse - Updated search scoring weights in
LocationRepositoryImpl(reduced from high values like 100,000 to more reasonable values like 1,000)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/test/java/com/souzip/api/domain/search/controller/SearchControllerTest.java | New test file documenting search API endpoints with various search scenarios |
| src/test/java/com/souzip/api/domain/user/controller/UserControllerTest.java | Updated pagination field references from totalElements to totalItems and added mock helper method |
| src/main/java/com/souzip/api/domain/souvenir/dto/MySouvenirListResponse.java | Refactored to use shared PageInfo instead of custom PaginationInfo |
| src/main/java/com/souzip/api/domain/search/dto/SearchResponse.java | Added id field to include location entity ID in search results |
| src/main/java/com/souzip/api/domain/search/repository/LocationRepositoryImpl.java | Adjusted search scoring weights and threshold values for more balanced results |
| src/main/java/com/souzip/api/domain/souvenir/repository/SouvenirRepository.java | Added import statement (contains duplicate) |
| src/docs/asciidoc/search.adoc | New documentation file for search API endpoints |
| src/docs/asciidoc/index.adoc | Added reference to new search documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| parameterWithName("pageSize").description("페이지 크기 (기본값: 20)").optional() | ||
| ), | ||
| responseFields( | ||
| apiResponseFields( // ✅ responseFields → apiResponseFields 변경! |
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment "✅ responseFields → apiResponseFields 변경!" appears to be a development note about a code change. This type of change documentation should not be left in the production code. Remove this comment as it serves no purpose for future maintainers and clutters the codebase.
| apiResponseFields( // ✅ responseFields → apiResponseFields 변경! | |
| apiResponseFields( |
| ===== HTTP 요청 | ||
| include::{snippets}/search/locations-english-city/http-request.adoc[] | ||
|
|
||
| ===== HTTP 응답 | ||
| include::{snippets}/search/locations-english-city/http-response.adoc[] | ||
|
|
||
| ===== 응답 필드 | ||
| include::{snippets}/search/locations-english-city/response-fields.adoc[] | ||
|
|
Copilot
AI
Jan 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The documentation references a test snippet "search/locations-english-city" (lines 52, 55, 58) but this test case doesn't exist in SearchControllerTest.java. The test file only includes tests for Korean city names, country names, multiple keywords, empty keywords, and no results. Either add the missing test case for English city search or remove these references from the documentation.
| ===== HTTP 요청 | |
| include::{snippets}/search/locations-english-city/http-request.adoc[] | |
| ===== HTTP 응답 | |
| include::{snippets}/search/locations-english-city/http-response.adoc[] | |
| ===== 응답 필드 | |
| include::{snippets}/search/locations-english-city/response-fields.adoc[] | |
| 영문 도시명 검색도 한글 도시명 검색과 동일한 요청 및 응답 형식을 사용하며, 같은 엔드포인트(`/api/search/locations`)를 통해 수행됩니다. |
개요
PR 유형
테스트
관련 이슈