-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix #2855, fix incorrect api parameter type #2856
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2856 +/- ##
============================================
- Coverage 94.43% 94.42% -0.02%
+ Complexity 3226 3225 -1
============================================
Files 364 364
Lines 8302 8304 +2
Branches 619 619
============================================
+ Hits 7840 7841 +1
Misses 304 304
- Partials 158 159 +1
|
Codecov Report
@@ Coverage Diff @@
## master #2856 +/- ##
============================================
+ Coverage 92.93% 94.43% +1.49%
+ Complexity 3513 3226 -287
============================================
Files 382 364 -18
Lines 9330 8304 -1026
Branches 768 619 -149
============================================
- Hits 8671 7842 -829
+ Misses 471 304 -167
+ Partials 188 158 -30
|
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.
Mostly looks ok, I feel its introducing a breaking change that will force people to have to annotate @RequestBody
. While it fixes your original bug, it breaks existing assumptions.
.../src/main/java/springfox/documentation/spring/web/readers/parameter/ParameterTypeReader.java
Outdated
Show resolved
Hide resolved
return "body"; | ||
return determineScalarParameterType( | ||
parameterContext.getOperationContext().consumes(), | ||
parameterContext.getOperationContext().httpMethod()); |
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.
When will it return a body in this case?
@@ -65,7 +65,7 @@ | |||
@ResponseBody | |||
@ApiOperation(value = "Creates list of users with given input array") | |||
public Mono<ResponseEntity<User>> createUsersWithArrayInput(@ApiParam(value = "List of user object", required = true) | |||
User[] users) { | |||
@RequestBody User[] users) { |
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.
Isnt this incorrect? You're fixing the existing tests by adding this request body. In essence you're not preserving the existing behavior
No description provided.