We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
springdoc
Learn more about funding links in repositories.
Report abuse
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
Describe the bug A HTTP header in multipart/form-data is handled as form item instead of header
To Reproduce
"multipart/form-data" : { "schema" : { "required" : [ "file", "request" ], "type" : "object", "properties" : { "request" : { "$ref" : "#/components/schemas/GreetRequest" }, "file" : { "type" : "string", "format" : "binary" }, "My-Header" : { } } } }
@Operation(summary = "Test Endpoint") @PostMapping(value = "/upload", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE) @ResponseStatus(OK) GreetResponse upload( @RequestHeader("My-Header") String workspaceId, @RequestPart("request") GreetRequest request, @RequestPart("file") MultipartFile file ) { return GreetResponse.of("Hello World!"); } record GreetRequest(String message1, String message2, String message3) { } record GreetResponse(String message) { static GreetResponse of(String message) { return new GreetResponse(message); } }
Expected behavior
Screenshots
The text was updated successfully, but these errors were encountered:
bc185f4
Changes report #1842.
47b724f
@jarekkar,
This is a regression. The workaround is to use:
springdoc.default-support-form-data=false
It will be fixed for next release.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
A HTTP header in multipart/form-data is handled as form item instead of header
To Reproduce
Expected behavior
Screenshots
The text was updated successfully, but these errors were encountered: