-
Notifications
You must be signed in to change notification settings - Fork 81
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
Missing status code 400 description in recommended-friends #8028
Missing status code 400 description in recommended-friends #8028
Conversation
WalkthroughThe pull request introduces a minor documentation enhancement to the Changes
Possibly related issues
Poem
Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
Quality Gate passedIssues Measures |
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.
Actionable comments posted: 0
🧹 Nitpick comments (2)
core/src/main/java/greencity/controller/FriendController.java (2)
258-259
: LGTM! Documentation enhancement improves API clarity.The addition of the 400 status code documentation aligns well with the rest of the controller's error handling patterns and improves API documentation consistency.
Consider adding a more specific description for the 400 error case, detailing what scenarios might trigger this response (e.g., invalid friend type). This would provide better guidance for API consumers.
- @ApiResponse(responseCode = "400", description = HttpStatuses.BAD_REQUEST, + @ApiResponse(responseCode = "400", description = "Invalid request. Possible reasons: invalid recommended friends type or pagination parameters",
Line range hint
266-268
: Enhance parameter documentation for better API clarity.The
type
parameter's documentation could be more descriptive. Consider adding the supported values to the OpenAPI documentation to match the detailed information in the Javadoc.- @RequestParam(required = false) RecommendedFriendsType type, + @Parameter(description = "Type of friend recommendation. Supported values: FRIENDS_OF_FRIENDS, HABITS, CITY") + @RequestParam(required = false) RecommendedFriendsType type,
GreenCity PR
Issue Link 📋
#8024
Summary by CodeRabbit
findRecommendedFriends
method by adding a detailed response code description for bad request scenarios (400 status code).