Fix handling multiple request form - #2052
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces support for multipart/form-data requests across the HTTP client, service resource layer, and generated API templates, specifically enabling document upload capabilities via the new DocumentsApi and associated models. Feedback on the changes highlights a regression where custom Content-Type headers are incorrectly ignored for non-multipart requests, a potential NullPointerException when formParams is null in createMultipartEntity, and redundant null checks generated by the mustache template for required form parameters.
278c9c2 to
c10e905
Compare
gcatanese
left a comment
There was a problem hiding this comment.
Now that the solution is validated I would remove all DocumentCollector related code (generated code, tests) from this PR.
Once we merge this we can regenerate the service and confirm
| ApiConstants.HttpMethod httpMethod, | ||
| Map<String, String> params) | ||
| throws IOException, HTTPClientException { | ||
| throw new UnsupportedOperationException("Multipart requests are not supported by this client"); |
There was a problem hiding this comment.
Message here can be made more clear:
throw new UnsupportedOperationException(
"Multipart requests are not supported by this HTTP client. "
+ "Custom ClientInterface implementations must override requestMultipart().");
There was a problem hiding this comment.
Updated the message
There was a problem hiding this comment.
Removed DocumentCollector related code
c10e905 to
09255a1
Compare
|



Description
Tested scenarios
Fixed issue: