Skip to content

[Java][Native] Fix an issue leading to an altered String parameter when consuming formatted strings like XML#11640

Merged
wing328 merged 2 commits intoOpenAPITools:masterfrom
Paul-Etienne:fix/11638
Feb 18, 2022
Merged

[Java][Native] Fix an issue leading to an altered String parameter when consuming formatted strings like XML#11640
wing328 merged 2 commits intoOpenAPITools:masterfrom
Paul-Etienne:fix/11638

Conversation

@Paul-Etienne
Copy link
Copy Markdown
Contributor

This PR intends to fix #11638. There's a bug in the native Java generator that alters a request if the request body of an endpoint is a formatted String like XML.
By using a method specific for Strings in the request builder, I've found that it fixes the problem. The body parameter is no longer altered with surrounding double quotes and escape characters.
For further information on how to validate my work, please refer to the linked issue.

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
  • File the PR against the correct branch: master (5.3.0), 6.0.x
  • If your PR is targeting a particular programming language, @mention the technical committee members, so they are more likely to review the pull request.

I'm tagging the technical committee responsible for the Java generator: @bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608

@wing328
Copy link
Copy Markdown
Member

wing328 commented Feb 18, 2022

LGTM

@wing328 wing328 merged commit d45cb65 into OpenAPITools:master Feb 18, 2022
@wing328
Copy link
Copy Markdown
Member

wing328 commented Feb 18, 2022

@Paul-Etienne thanks for the PR, which has been merged into the master.

@Paul-Etienne Paul-Etienne deleted the fix/11638 branch February 18, 2022 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG][Java Native] Generator with XML request body alters the XML content and adds surrounding quotes and escape chars

2 participants