Skip to content

[TEST] 작품 알림 변경 반영 노티피케이션 API 테스트 및 문서화 - #615

Draft
ljy1348 wants to merge 4 commits into
devfrom
feat/#612
Draft

ljy1348 wants to merge 4 commits into
devfrom
feat/#612

Conversation

@ljy1348

@ljy1348 ljy1348 commented Aug 22, 2026 •

Copy link
Copy Markdown
Contributor

Related Issue

Key Changes

  • NotificationController API 6개의 애플리케이션 계층 요청 위임과 HTTP 응답을 단위 테스트로 검증했습니다.
  • 알림 목록 조회, 공지 알림 상세 조회, 읽지 않은 알림 상태 조회, 알림 읽음 처리 API를 REST Docs로 문서화했습니다.
  • Deprecated API인 GET /notifications/unread, POST /notifications/{notificationId}/read도 대체 API 안내와 함께 문서화하고 OpenAPI에 deprecated: true로 표시했습니다.
  • 목록 성공 예시에 피드·완결·휴재 복귀·공지 알림을 함께 구성해 feedId와 novelId의 nullable 이동 계약을 OpenAPI 스키마에 반영했습니다.
  • 커서·조회 개수·알림 ID 검증 오류와 운영·Deprecated API별 인증 3종, 사용자 없음, 알림 없음, 알림 유형·읽기 권한 오류 응답을 문서화했습니다.
  • 공지 상세의 nullable 본문과 기본값이 없는 목록 커서를 실제 컨트롤러 계약에 맞게 명세에 반영했습니다.
  • 로케일에 따라 달라질 수 있는 Bean Validation 메시지는 클라이언트가 code로 분기하도록 Swagger에 안내했습니다.

Test

  • ./gradlew test --tests org.websoso.WSSServer.notification.controller.NotificationControllerTest --tests org.websoso.WSSServer.notification.controller.notification.NotificationDocsTest
  • ./gradlew apiDocs

두 명령 모두 로컬에서 성공했습니다. 생성된 build/api-spec/openapi3.json에서 6개 경로, Deprecated 표시, 작품 알림 예시, nullable 스키마, 전체 오류 응답 named example을 확인했습니다.

To Reviewers

  • 기존 읽음 처리 API는 201 Created, 신규 API는 204 No Content를 반환하는 차이를 각각 문서에 유지했습니다.
  • Deprecated POST /notifications/{notificationId}/read에는 @Positive 검증이 없어 경로 파라미터에 양수 제약을 표기하지 않았습니다.
  • OpenAPI 산출물은 기존 정책대로 build/ 아래에서 생성하며 커밋하지 않습니다.

References

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.

[TEST] 작품 알림 변경 반영 노티피케이션 API 테스트 및 문서화

1 participant