Skip to content

refactor: 미사용 example 패키지 제거#392

Merged
jihwankim128 merged 1 commit intomainfrom
refactor/regacy-code
Dec 1, 2025
Merged

refactor: 미사용 example 패키지 제거#392
jihwankim128 merged 1 commit intomainfrom
refactor/regacy-code

Conversation

@jihwankim128
Copy link
Collaborator

@jihwankim128 jihwankim128 commented Dec 1, 2025

#️⃣ 연관된 이슈

ex) close #Issue number

📝 작업 내용

이번 PR에서 작업한 내용을 간략히 설명해주세요(이미지 첨부 가능)

📷 스크린샷

이미지

💬 리뷰 요구사항(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 명칭

📌 PR 진행 시 참고사항

  • 리뷰어는 좋은 코드 방향을 제시하되, 수정을 강요하지 않습니다.
  • 좋은 코드를 발견하면 칭찬과 격려를 아끼지 않습니다.
  • 리뷰는 Reviewer로 지정된 시점 기준으로 3일 이내에 진행해 주세요.
  • Comment 작성 시 아래 Prefix를 사용해 주세요:
    • P1: 꼭 반영해 주세요 (Request Changes) – 이슈나 취약점 관련
    • P2: 반영을 고려해 주세요 (Comment) – 개선 의견
    • P3: 단순 제안 (Chore)

Summary by CodeRabbit

Chores

  • Removed example post management API endpoints (create, update, delete, retrieve) and related data models
  • Removed test database initialization and fake authentication utilities

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 1, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

This PR removes example and test-related scaffolding code, including: a test-profile REST controller for post operations, associated request/response DTOs, a response message enum, Swagger documentation interface, a database initialization tool controller, and a fake authentication tool controller.

Changes

Cohort / File(s) Change Summary
Post API Example Removal
src/main/java/com/example/green/domain/example/api/ExamplePostResponseMessage.java
Removed public enum ExamplePostResponseMessage implementing ResponseMessage with four constants (POST_CREATED, POST_UPDATED, POST_FOUND, POST_DELETED), Lombok annotations (@Getter, @AllArgsConstructor), and associated imports.
Post Controller Removal
src/main/java/com/example/green/domain/example/controller/ExamplePostController.java
Removed @Profile("test") REST controller exposing five endpoints (POST, PUT, DELETE, GET, GET-list) for post operations under /api/posts with role-based access and hardcoded sample data.
Post API Documentation Removal
src/main/java/com/example/green/domain/example/controller/ExamplePostControllerDocs.java
Removed OpenAPI/Swagger documentation interface with five method signatures and associated ApiError, Operation, and Parameter annotations.
Post DTOs Removal
src/main/java/com/example/green/domain/example/dto/PostRequest.java, src/main/java/com/example/green/domain/example/dto/PostResponse.java, src/main/java/com/example/green/domain/example/dto/PostListResponse.java
Removed three DTO classes: PostRequest (with @Data, validation constraints), PostResponse (with @Data, @AllArgsConstructor), and PostListResponse (with @Getter, @AllArgsConstructor), along with Lombok and Swagger annotations.
Database Tools Removal
src/main/java/com/example/green/domain/example/tools/DbInitializer.java
Removed @Profile("!prod") REST controller exposing five endpoints to populate test data for PointProducts, PointTransactions, DeliveryAddresses, Orders, and Members, with batch operations and reflection-based timestamp manipulation.
Fake Auth Tools Removal
src/main/java/com/example/green/domain/example/tools/FakeAuthTools.java
Removed @Hidden REST controller with two endpoints (/auth/{id}, /auth/admin) for generating fake authentication tokens and refresh token cookies, using MemberRepository and TokenService.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • Verify that no production code or other modules depend on the removed classes
  • Confirm that removal of test-profile controllers doesn't affect active profiles
  • Check for any lingering references to PostRequest, PostResponse, or PostListResponse in remaining code

Poem

🐰 Goodbye scaffolding, farewell fake tools,
Old examples cleared from the digital schools,
Post controllers rest, test data retires,
Clean slate emerging as old code expires,
Hopping forward now, lean and refined! 🎉

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/regacy-code

📜 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 b245f6e and 0ad9d62.

📒 Files selected for processing (8)
  • src/main/java/com/example/green/domain/example/api/ExamplePostResponseMessage.java (0 hunks)
  • src/main/java/com/example/green/domain/example/controller/ExamplePostController.java (0 hunks)
  • src/main/java/com/example/green/domain/example/controller/ExamplePostControllerDocs.java (0 hunks)
  • src/main/java/com/example/green/domain/example/dto/PostListResponse.java (0 hunks)
  • src/main/java/com/example/green/domain/example/dto/PostRequest.java (0 hunks)
  • src/main/java/com/example/green/domain/example/dto/PostResponse.java (0 hunks)
  • src/main/java/com/example/green/domain/example/tools/DbInitializer.java (0 hunks)
  • src/main/java/com/example/green/domain/example/tools/FakeAuthTools.java (0 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@jihwankim128 jihwankim128 merged commit 0f9b78d into main Dec 1, 2025
1 of 2 checks passed
@jihwankim128 jihwankim128 deleted the refactor/regacy-code branch December 1, 2025 08:33
@github-actions
Copy link

github-actions bot commented Dec 1, 2025

Unit Test Coverage Report

Total Project Coverage 37.82%

There is no coverage information present for the Files changed

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.

1 participant