Skip to content

Conversation

@ggamnunq
Copy link
Contributor

@ggamnunq ggamnunq commented Aug 20, 2025

  • 검색
    • 검색 API 키워드 적용
  • 명소
    • 조회 시 카테고리에서 CAFE 제거
  • 채팅
    • 채팅 메시지 길이 200자 이상의 경우 예외처리
    • 잘못된 body 요청에 대한 예외처리 ( ExceptionAdvice에서 메서드 오버라이드 추가 : handleHttpMessageNotReadable())

Summary by CodeRabbit

  • New Features
    • 검색 API에 keyword 파라미터 추가로 이름 기반 필터링 지원
    • 채팅 메시지 본문 유효성 검사(공백 불가, 1~200자 제한) 적용
  • Bug Fixes
    • 잘못된 요청 본문/형식에 대해 더 명확한 오류 메시지 반환
  • Refactor
    • 카페 관련 옵션 및 경로 제거로 카페 검색/추천 비활성화
  • Documentation
    • 채팅/축제/검색 API 설명 강화, 카카오 OAuth 엔드포인트 문서에서 숨김

@ggamnunq ggamnunq self-assigned this Aug 20, 2025
@coderabbitai
Copy link

coderabbitai bot commented Aug 20, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

채팅 엔드포인트에 Bean Validation과 OpenAPI 메타데이터가 추가되고, 길이 검증 로직이 서비스에서 제거되었습니다. 검색 API는 keyword 파라미터를 도입해 서버 측 필터링을 수행합니다. CAFE 관련 enum/분기들이 비활성화되었습니다. 전역 예외 처리에 HttpMessageNotReadable 처리기가 추가되었습니다. 일부 컨트롤러에 Swagger 메타데이터가 보강되었습니다.

Changes

Cohort / File(s) Summary
Chat API: 검증·문서화 갱신
src/main/kotlin/busanVibe/busan/domain/chat/controller/ChatRestController.kt, src/main/kotlin/busanVibe/busan/domain/chat/dto/websocket/ChatMessageSendDTO.kt
컨트롤러에 @Valid 적용 및 @operation 추가. DTO에 @notblank, @SiZe(1..200) 제약 추가. 컨트롤러의 로거 제거.
Chat 서비스: 내부 로직 정리
src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt
메시지 길이 에러 전송 경로와 SimpMessagingTemplate 의존성 제거. SLF4J 로깅 추가. 메시지 생성 방식 단순화 후 Redis publish 유지.
검색 기능: keyword 도입
src/main/kotlin/busanVibe/busan/domain/search/controller/SearchController.kt, src/main/kotlin/busanVibe/busan/domain/search/service/SearchQueryService.kt
컨트롤러·서비스 시그니처에 keyword 추가. 이름 기반(공백 제거, 대소문자 무시) 필터링 로직 추가. CAFE 분기 주석 처리.
CAFE 타입 비활성화 전파
src/main/kotlin/busanVibe/busan/domain/common/dto/InfoType.kt, src/main/kotlin/busanVibe/busan/domain/place/enums/PlaceType.kt, src/main/kotlin/busanVibe/busan/domain/tourApi/service/TourCommandService.kt, src/main/kotlin/busanVibe/busan/domain/user/service/UserQueryService.kt
InfoType/PlaceType의 CAFE 상수 주석 처리. 투어 API 매핑(CAFE 관련)과 사용자 조회의 CAFE 분기 제거/무효화.
전역 예외 처리 보강
src/main/kotlin/busanVibe/busan/global/apiPayload/exception/ExceptionAdvice.kt
HttpMessageNotReadableException 전용 핸들러 추가. 메시지 내용 매핑 후 400 응답 생성.
API 문서 메타데이터 보강
src/main/kotlin/busanVibe/busan/domain/festival/controller/FestivalController.kt, src/main/kotlin/busanVibe/busan/domain/user/controller/UserAuthController.kt
축제 목록에 @operation(summary) 추가. 카카오 OAuth 엔드포인트에 @operation(hidden = true) 추가.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant C as Client
  participant R as ChatRestController
  participant V as Bean Validation
  participant S as ChatMongoService
  participant M as ChatMongoRepository
  participant P as RedisPublisher

  C->>R: POST /api/chat/send (ChatMessageSendDTO)
  R->>V: DTO 검증(@NotBlank, @Size)
  alt 유효성 위반
    V-->>R: ConstraintViolationException
    R-->>C: 400 Bad Request (전역 핸들러)
  else 유효
    R->>S: sendMessage(chatMessage)
    S->>M: save(ChatMessage)
    M-->>S: saved document
    S->>P: publish(ChatMessageReceiveDTO)
    P-->>C: (구독자에게 전파)
    S-->>R: 완료
    R-->>C: 200 OK
  end
  note over R,S: 이전의 길이 에러 WebSocket 전송 경로 제거됨
Loading
sequenceDiagram
  autonumber
  participant C as Client
  participant SC as SearchController
  participant SQ as SearchQueryService

  C->>SC: GET /api/search?option=...&sort=...&keyword=...
  SC->>SQ: getSearchResult(infoType, sort, keyword)
  alt infoType == CAFE
    note over SQ: CAFE 분기 비활성화
    SQ-->>SC: 빈 결과 리스트 포함 DTO
  else 다른 타입
    SQ->>SQ: 목록 생성 → keyword 필터(공백 제거, 대소문자 무시)
    SQ-->>SC: 필터링된 리스트 포함 DTO
  end
  SC-->>C: 200 OK (SearchResultDTO)
Loading
sequenceDiagram
  autonumber
  participant C as Client
  participant S as Server
  participant EA as ExceptionAdvice

  C->>S: 요청 본문 파싱 불가(JSON 오류 등)
  S-->>EA: HttpMessageNotReadableException
  EA-->>C: 400 Bad Request (매핑된 한글 메시지)
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Poem

토끼는 귀를 쫑긋, 로그는 살짝 숨기고,
말 길이 재며 깡총, 검증을 챙겨 보죠.
카페는 잠시 쉬고, 키워드로 쏙쏙!
검색은 말랑 말랑, 응답은 또렷 또록.
툭, 잘못된 본문? 400으로 콩!

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Free

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 246db27 and 103f8e6.

📒 Files selected for processing (12)
  • src/main/kotlin/busanVibe/busan/domain/chat/controller/ChatRestController.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/dto/websocket/ChatMessageSendDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/chat/service/ChatMongoService.kt (3 hunks)
  • src/main/kotlin/busanVibe/busan/domain/common/dto/InfoType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/controller/FestivalController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/enums/PlaceType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/search/controller/SearchController.kt (2 hunks)
  • src/main/kotlin/busanVibe/busan/domain/search/service/SearchQueryService.kt (3 hunks)
  • src/main/kotlin/busanVibe/busan/domain/tourApi/service/TourCommandService.kt (3 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/controller/UserAuthController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/service/UserQueryService.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/global/apiPayload/exception/ExceptionAdvice.kt (3 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ggamnunq ggamnunq merged commit 0a0e78c into main Aug 20, 2025
1 of 2 checks 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