Created by: harmony7
This PR adds support for the style
and explode
values on the encoding
object onto request body parameters that are submitted as application/x-www-form-urlencoded
or multipart
.
The Encoding Object allows the specification of style
and explode
similar to how they can be applied to operation parameter
s.
There has already existed code that would apply contentType
from this Encoding Object, but this was the only value that was being applied. This PR renames that function from setParameterContentType
to setParameterEncodingValues
, and now also applies style
and explode
as appropriate.
I've added tests to DefaultCodegenTest.testRequestBodyContent()
against some new definitions in resources/3_0/content-data.yaml
to show that these work.
This should fix issues such as #3781 and #11256.
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
./bin/generate-samples.sh bin/configs/java*
. For Windows users, please run the script in Git BASH.