-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG][JAVA][SERVER] In release 6.2.1, spring server generator creates wrong annotation on method parameter for multipart request #14295
Comments
Issue was introduced here #11449 and released as part of 6.0.0. I'll pick this one |
@raverone latest 6.3.0-spanshot should contains this fix. Could you try it? |
Thanks @borsch ! |
Using |
Your comment is correct. There is a bug for the reactive stack. @wing328 @cachescrubber @borsch If you like, I can make a PR so that in the case of reactive the parameter is created as |
@jorgerod yes please file a PR to start with and we'll review accordingly. |
|
Description
Spring server genertor creates wrong annotation on method parameter for multipart request.
The request have 2 parameters:
In version 5.4.0 both parameters would be annotated with
@RequestPart
. Which is correct.But starting from version 6.0.0 (until the 6.2.1 at least) param1 would be annotated with
@RequestParam
and param2 with@RequestPart
.In this case, if you make a call to such endpoint, Spring won't be able to convert the request parameters and will throw
openapi-generator version
6.2.1
OpenAPI declaration file content or url
Gist
Generation Details
Generation is done with the gradle plugin by executing ./gradlew :openApiGenerate
Steps to reproduce
I created a minimal project on github
Steps to reproduce the bug:
./gradlew :openApiGenerate
build/generated/src/main/java/org/example/bug/http/api/TestApiApi.java
./gradlew -i :test
. It should pass, but currently it isn't.The text was updated successfully, but these errors were encountered: