Skip to content

Conversation

@Develop-KIM
Copy link
Contributor

개요

PR 유형

  • 새로운 기능 추가
  • 버그 수정
  • 코드에 영향을 주지 않는 변경사항(오타 수정, 탭 사이즈 변경, 변수명 변경)
  • 코드 리팩토링
  • 주석 추가 및 수정
  • 문서 수정
  • 테스트 추가, 테스트 리팩토링
  • 빌드 부분 혹은 패키지 매니저 수정
  • 파일 혹은 폴더명 수정
  • 파일 혹은 폴더 삭제

테스트

  • 로컬에서 테스트 완료
  • 단위 테스트 작성/업데이트
  • 통합 테스트 확인

관련 이슈

  • 관련 이슈 번호: #

Copilot AI review requested due to automatic review settings January 3, 2026 10:20
@Develop-KIM Develop-KIM force-pushed the feature/SOU-29-search branch from 7aee8f1 to 9f5a635 Compare January 3, 2026 10:20
@Develop-KIM Develop-KIM merged commit 1ce7ad9 into develop Jan 3, 2026
1 check passed
Copy link

Copilot AI left a 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.java with 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 PaginationInfo to shared PageInfo class in MySouvenirListResponse
  • 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 변경!
Copy link

Copilot AI Jan 3, 2026

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.

Suggested change
apiResponseFields( // ✅ responseFields → apiResponseFields 변경!
apiResponseFields(

Copilot uses AI. Check for mistakes.
Comment on lines +51 to +59
===== 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[]

Copy link

Copilot AI Jan 3, 2026

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.

Suggested change
===== 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`)를 통해 수행됩니다.

Copilot uses AI. Check for mistakes.
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