Skip to content

Fix handling multiple request form - #2052

Merged
poojah-adyen merged 1 commit into
mainfrom
document-collector-fix
Aug 25, 2026
Merged

Fix handling multiple request form#2052
poojah-adyen merged 1 commit into
mainfrom
document-collector-fix

Conversation

@poojah-adyen

Copy link
Copy Markdown
Contributor

Description

Tested scenarios

Fixed issue:

@poojah-adyen
poojah-adyen requested a review from a team as a code owner August 25, 2026 10:35

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Comment thread src/main/java/com/adyen/httpclient/AdyenHttpClient.java
Comment thread src/main/java/com/adyen/httpclient/AdyenHttpClient.java
Comment thread templates-v7/libraries/jersey3/api.mustache
@poojah-adyen
poojah-adyen force-pushed the document-collector-fix branch 3 times, most recently from 278c9c2 to c10e905 Compare August 25, 2026 12:39
@poojah-adyen
poojah-adyen enabled auto-merge August 25, 2026 13:20

@gcatanese gcatanese left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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().");

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Updated the message

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed DocumentCollector related code

@poojah-adyen
poojah-adyen force-pushed the document-collector-fix branch from c10e905 to 09255a1 Compare August 25, 2026 13:48
@sonarqubecloud

Copy link
Copy Markdown

@poojah-adyen
poojah-adyen added this pull request to the merge queue Aug 25, 2026
Merged via the queue into main with commit b652e70 Aug 25, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants