Skip to content

Conversation

@ggamnunq
Copy link
Contributor

@ggamnunq ggamnunq commented Jul 27, 2025

  • 응답 DTO 및 API 컨트롤러 생성 ( 스웨거 간략 명세 )
  • 명소 목록 조회 API 구현
  • 올바르지 않은 타입( path variable, query parameters )에 대한 예외 처리
  • 배포 최신화 디스코드 웹훅 전송 스크립트 작성 ( discord.yml )

Summary by CodeRabbit

  • New Features

    • Introduced new REST API endpoints for festival and place information, including festival details, place lists, congestion data, and user reviews.
    • Added support for filtering and sorting places by type, likes, and congestion.
    • Implemented detailed data transfer objects (DTOs) for structured API responses.
    • Added Discord notification workflow for pull request merges to main.
  • Improvements

    • Enhanced error handling for invalid request parameters with more descriptive messages.
    • Expanded enum options for place and region types.
  • Bug Fixes

    • Adjusted database schema update strategy to preserve existing data.
  • Chores

    • Removed unused test and constructor parameters to streamline codebase.

@ggamnunq ggamnunq self-assigned this Jul 27, 2025
@coderabbitai
Copy link

coderabbitai bot commented Jul 27, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This update introduces new REST controllers, DTOs, enums, repositories, and a service layer for managing places and festivals in a Kotlin Spring application. It also adds a GitHub Actions workflow for Discord notifications, improves exception handling, adjusts JPA schema settings, and modifies entity mappings and enum definitions. Some test and constructor parameters are removed.

Changes

Cohort / Files Change Summary
Discord Notification
.github/workflows/discord.yml
Added a GitHub Actions workflow to notify a Discord channel when pull requests are merged into the main branch, including commit messages in the notification.
Festival API
src/main/kotlin/busanVibe/busan/domain/festival/controller/FestivalController.kt
src/main/kotlin/busanVibe/busan/domain/festival/dto/FestivalDetailsDTO.kt
src/main/kotlin/busanVibe/busan/domain/festival/dto/FestivalListResponseDTO.kt
src/main/kotlin/busanVibe/busan/domain/festival/enums/FestivalSortType.kt
src/main/kotlin/busanVibe/busan/domain/festival/enums/FestivalStatus.kt
Introduced REST controller, DTOs, and enums for festival listing and details APIs. The controller endpoints and DTOs are stubbed for future implementation.
Place API Controllers & Converter
src/main/kotlin/busanVibe/busan/domain/place/controller/PlaceController.kt
src/main/kotlin/busanVibe/busan/domain/place/controller/PlaceCongestionController.kt
src/main/kotlin/busanVibe/busan/domain/place/converter/PlaceConverter.kt
Added REST controllers for places and congestion endpoints, with stub methods and a placeholder converter class.
Place DTOs
src/main/kotlin/busanVibe/busan/domain/place/dto/PlaceMapResponseDTO.kt
src/main/kotlin/busanVibe/busan/domain/place/dto/PlaceResponseDTO.kt
Introduced DTOs for place lists, details, congestion, and reviews, using snake_case JSON serialization.
Place Domain & Repositories
src/main/kotlin/busanVibe/busan/domain/place/domain/PlaceLike.kt
src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceImageRepository.kt
src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceLikeRepository.kt
src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceRepository.kt
Added entity and repository interfaces for place likes, images, and retrieval by type, supporting data access for the new APIs.
Place Service
src/main/kotlin/busanVibe/busan/domain/place/service/PlaceQueryService.kt
Implemented a service to fetch, filter, enrich, and sort place data, integrating user likes, images, and congestion levels stored in Redis.
Place Enums
src/main/kotlin/busanVibe/busan/domain/place/enums/PlaceSortType.kt
src/main/kotlin/busanVibe/busan/domain/place/enums/PlaceType.kt
src/main/kotlin/busanVibe/busan/domain/place/enums/RegionType.kt
Added and updated enums for place sorting, types (with Korean names), and region types (added 'ALL').
FestivalLike Entity
src/main/kotlin/busanVibe/busan/domain/festival/domain/FestivalLike.kt
Changed JPA mapping from @JoinTable to @JoinColumn for the festival property.
Exception Handling
src/main/kotlin/busanVibe/busan/global/apiPayload/exception/ExceptionAdvice.kt
Added a handler for MethodArgumentTypeMismatchException to provide detailed error messages for type mismatches in request parameters.
User Auth Service
src/main/kotlin/busanVibe/busan/domain/user/service/login/AuthService.kt
Removed the userRepository constructor parameter from AuthService.
JPA Schema Update
src/main/resources/application.yml
Changed Hibernate ddl-auto from create to update for incremental schema updates.
Test Cleanup
src/test/kotlin/busanVibe/busan/BusanApplicationTests.kt
Removed the empty contextLoads() test method.

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant PlaceController
  participant PlaceQueryService
  participant PlaceRepository
  participant PlaceLikeRepository
  participant PlaceImageRepository
  participant Redis

  Client->>PlaceController: GET /api/places?category&sort
  PlaceController->>PlaceQueryService: getPlaceList(category, sort)
  PlaceQueryService->>PlaceRepository: findByType(category)
  PlaceRepository-->>PlaceQueryService: List<Place>
  PlaceQueryService->>PlaceLikeRepository: findAllByPlaceIn(places)
  PlaceLikeRepository-->>PlaceQueryService: List<PlaceLike>
  PlaceQueryService->>PlaceImageRepository: findByPlaceIn(places)
  PlaceImageRepository-->>PlaceQueryService: List<PlaceImage>
  PlaceQueryService->>Redis: getCongestion(placeId)
  Redis-->>PlaceQueryService: Int (congestion level)
  PlaceQueryService-->>PlaceController: PlaceListDto
  PlaceController-->>Client: ApiResponse<PlaceListDto>
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~40 minutes

Poem

A bunny hops with code so bright,
New places, fests, and enums light,
Controllers bloom, responses grow,
Congestion tracked, exceptions show.
Discord pings with merge delight—
In Busan's spring, all features right!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between a66e3f5 and 6faddad.

📒 Files selected for processing (24)
  • .github/workflows/discord.yml (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/controller/FestivalController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/domain/FestivalLike.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/dto/FestivalDetailsDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/dto/FestivalListResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/enums/FestivalSortType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/festival/enums/FestivalStatus.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/controller/PlaceCongestionController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/controller/PlaceController.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/converter/PlaceConverter.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/domain/PlaceLike.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/dto/PlaceMapResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/dto/PlaceResponseDTO.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/enums/PlaceSortType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/enums/PlaceType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/enums/RegionType.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceImageRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceLikeRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/repository/PlaceRepository.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/place/service/PlaceQueryService.kt (1 hunks)
  • src/main/kotlin/busanVibe/busan/domain/user/service/login/AuthService.kt (0 hunks)
  • src/main/kotlin/busanVibe/busan/global/apiPayload/exception/ExceptionAdvice.kt (2 hunks)
  • src/main/resources/application.yml (1 hunks)
  • src/test/kotlin/busanVibe/busan/BusanApplicationTests.kt (0 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

🪧 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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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 bfc82ce into main Jul 27, 2025
2 of 3 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