-
Notifications
You must be signed in to change notification settings - Fork 0
swagger 기반 API 문서 작성 #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
🧪 테스트 커버리지 리포트
|
There was a problem hiding this 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.
🚀 작업 내용
swagger와 spring rest docs를 통합한 api 문서 기능을 추가합니다.
추가적으로 더 풍부한 문서 작성을 위해 테스트를 더 보완하였습니다.
📸 이슈 번호
✍ 궁금한 점