Skip to content

Conversation

@joyewon0705
Copy link
Collaborator

📌 개요

  • 게시글에 댓글을 작성할 수 있는 API를 구현했습니다.
  • Swagger 문서 및 Controller/Service/Repository/테스트 코드 포함.

🔨 작업 내용

  • Controller

    • CommentController 추가
    • POST /api/posts/{postId}/comments 엔드포인트 구현
  • Service

    • CommentService#createComment 구현
    • User, Post 검증 후 Comment 생성 및 저장
  • DTO

    • CommentRequest, CommentResponse 작성
    • Author 정보 포함 응답 구조 정의
  • Entity

    • Comment 엔티티에 (Post, User, String) 생성자 추가
  • Repository

    • CommentRepository 추가
  • Swagger

    • CommentControllerDocs 작성 (성공/실패 응답 예시 포함)
  • Test

    • CommentServiceTest: 성공/실패 케이스 단위 테스트
    • CommentControllerTest: 통합 테스트 (MockMvc 기반)

🔗 관련 이슈

Closes #152

📝 참고 사항

✅ 체크리스트

  • 기능 동작 확인
  • 테스트 코드 작성
  • 문서/주석 추가 및 최신화

@github-actions github-actions bot changed the title Feat: 댓글 생성 API 구현 Feat: 댓글 생성 API 구현 (#152) Oct 2, 2025
@joyewon0705 joyewon0705 merged commit 0a63ccc into dev Oct 2, 2025
2 checks passed
@github-actions github-actions bot deleted the Feat/152 branch October 2, 2025 07:12
namgigun pushed a commit that referenced this pull request Oct 4, 2025
* Feat: 댓글 생성 API 구현

* Test: 테스트 작성

* Docs: Swagger 문서 작성
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.

4 participants