Skip to content

Conversation

@jhan0121
Copy link
Owner

🚀 작업 내용

swagger와 spring rest docs를 통합한 api 문서 기능을 추가합니다.

추가적으로 더 풍부한 문서 작성을 위해 테스트를 더 보완하였습니다.

📸 이슈 번호

✍ 궁금한 점

  • 프로덕션 코드에 혼재되는 것을 막기 위해 테스트 코드 기반의 api 문서 기능을 추가했다. 이로 인해 생길 수 있는 단점이 얻는 장점에 비해 작다고 생각해서 적용했는데, 더 효과적인 방법이 있을까?

@jhan0121 jhan0121 added this to the v1.0.0 milestone Dec 26, 2025
@jhan0121 jhan0121 requested a review from Copilot December 26, 2025 14:28
@jhan0121 jhan0121 self-assigned this Dec 26, 2025
@jhan0121 jhan0121 added BE Backend ✅ test 테스트 관련 ✨ feat 기능 추가 📄 docs 문서 관련 labels Dec 26, 2025
@github-actions
Copy link

github-actions bot commented Dec 26, 2025

🧪 테스트 커버리지 리포트

Overall Project 83.63% 🍏

There is no coverage information present for the Files changed

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates Swagger with Spring REST Docs to generate comprehensive API documentation from test cases. The approach keeps documentation definitions in test code to avoid mixing with production code, while enhancing test coverage to provide richer documentation through error case testing.

Key Changes:

  • Added RestDocs base test class with pre-configured documentation settings
  • Enhanced test coverage with additional validation and error scenarios to document all API behaviors
  • Configured Gradle build to generate OpenAPI 3.0 YAML and Swagger UI from test-generated snippets

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
src/test/java/com/recyclestudy/restdocs/APIBaseTest.java New base test class providing RestDocs configuration and request specification setup for all API tests
src/test/java/com/recyclestudy/member/controller/MemberControllerTest.java Added comprehensive RestDocs annotations to all tests and expanded test coverage with new parameter validation tests
src/test/java/com/recyclestudy/member/controller/DeviceControllerTest.java Added comprehensive RestDocs annotations to all tests and expanded test coverage with additional error case tests
src/main/java/com/recyclestudy/exception/GlobalControllerAdvice.java Added exception handler for missing request parameters to support new validation tests
build.gradle Added RestDocs and Swagger plugins/dependencies, configured OpenAPI generation and Swagger UI copy tasks
.gitignore Added generated Swagger UI documentation directory to ignore list

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jhan0121 jhan0121 merged commit 0496449 into be/dev Dec 26, 2025
1 check passed
@jhan0121 jhan0121 deleted the be/feat/swagger branch December 26, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BE Backend 📄 docs 문서 관련 ✨ feat 기능 추가 ✅ test 테스트 관련

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants