Skip to content

[Java] Fix content for enum in MultiPart (#19973) #21373

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

Closed
wants to merge 7 commits into from

Conversation

jarryDk
Copy link
Contributor

@jarryDk jarryDk commented Jun 4, 2025

Fix content for enum in addPartToMultiPartBuilder.

Enum is going forward set to MediaType text/plain and not MediaType application/json in MultiPartBuilder and .toString() is used to get the value from the enum.

@wing328
Copy link
Member

wing328 commented Jun 4, 2025

please follow step 3 to update samples so that CI can verify the change

@jarryDk jarryDk changed the title [Java] Fix content for enum in addPartToMultiPartBuilder (#19973) [Java] Fix content for enum in MultiPart (#19973) Jun 4, 2025
@@ -0,0 +1,7 @@
generatorName: java
outputDir: samples/client/others/java/restclient-enum-in-multipart
Copy link
Member

Choose a reason for hiding this comment

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

please add this new folder to the github workflow so that ci will test it moving forward

https://github.com/OpenAPITools/openapi-generator/blob/master/.github/workflows/samples-java-client-jdk11.yaml

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@wing328
Copy link
Member

wing328 commented Jun 10, 2025

can you please review the CI failure when you've time?

@jarryDk
Copy link
Contributor Author

jarryDk commented Jun 11, 2025

Had a look at ./CI/circle_parallel.sh as I can see it fails on samples/client/others/java/okhttp-gson-streaming - I do not bring any changes to samples/client/others/java/okhttp-gson-streaming.

For now my PR only update java/restclient and samples/client/others/java/okhttp-gson-streaming pass on my machine both with JDK8, JDK11 and JDK17

@wing328
Copy link
Member

wing328 commented Jun 16, 2025

@jarryDk
Copy link
Contributor Author

jarryDk commented Jun 17, 2025

@wing328 - It should be ok now.

I have update the samples with

 bash bin/generate-samples.sh

where i previous used

./bin/generate-samples.sh ./bin/configs/*.yaml

object ApiResponse {
implicit val encoderApiResponse: Encoder[ApiResponse] = deriveEncoder[ApiResponse].mapJson(_.dropNullValues)
implicit val decoderApiResponse: Decoder[ApiResponse] = deriveDecoder[ApiResponse]
}
Copy link
Member

Choose a reason for hiding this comment

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

there shouldn't be change to scala samples. looks like it's due to incorrect git merge/rebase

i've filed #21428 with updated samples

@wing328 wing328 closed this Jun 18, 2025
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.

2 participants