Skip to content

Conversation

@ckdals4600
Copy link
Contributor

관련 이슈

PR 설명

  • 사용자가 서비스 이용 중 겪는 버그나 불편 사항을 제보할 수 있는 API 개발

작업 내용

1. API 명세 구현 (ReportController)

  • Endpoint: POST /v1/report
  • Request: ReportReq
    • content: 제보 내용 (String).
      {
        "content": "링크 저장이 안 되고 400 에러가 계속 뜹니다."
      }
  • Response: 200 OK (성공 메시지 반환).
  • Validation:
    • ReportApi 인터페이스에 @Valid, @NotBlank 등을 적용하여 내용 누락 방지

2. 비즈니스 로직 (Layered Architecture)

  • ReportService:
    • 트랜잭션을 관리하고 ReportCommandService를 호출하는 Facade 역할 수행
  • ReportCommandService:
    • 실제 Report 엔티티를 생성하고 리포지토리를 통해 저장하는 로직 담당

3. 테스트 작성

  • Integration Test (ReportApiIntegrationTest):
    • MockMvc를 사용하여 실제 엔드포인트 호출 및 DB 저장 여부를 통합 테스트로 검증
  • Unit Test:
    • ReportServiceTest: CommandService 호출 위임 검증.
    • ReportCommandServiceTest: Repository 저장 로직 검증.

@ckdals4600 ckdals4600 linked an issue Dec 22, 2025 that may be closed by this pull request
@ckdals4600 ckdals4600 self-assigned this Dec 22, 2025
@ckdals4600 ckdals4600 requested review from Goder-0 and minibr December 22, 2025 15:17
@github-actions
Copy link

github-actions bot commented Dec 22, 2025

📊 코드 커버리지 리포트

Overall Project 88.03% 🍏
Files changed 100% 🍏

File Coverage
ReportController.java 100% 🍏
ReportCommandService.java 100% 🍏
ReportService.java 100% 🍏

@ckdals4600 ckdals4600 force-pushed the feature/#162-report-api branch from b96eeba to fa26870 Compare December 31, 2025 03:38
@ckdals4600 ckdals4600 requested a review from Goder-0 January 1, 2026 16:32
@ckdals4600 ckdals4600 force-pushed the feature/#162-report-api branch from 9689675 to a67b05e Compare January 4, 2026 22:30
@ckdals4600 ckdals4600 merged commit 03688ff into main Jan 4, 2026
1 check passed
@ckdals4600 ckdals4600 deleted the feature/#162-report-api branch January 4, 2026 23:05
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.

오류 및 불만 제보 API 개발

3 participants