-
-
Notifications
You must be signed in to change notification settings - Fork 535
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Describe the bug
swagger.io documentation has support for adding your own Content-Type
for specific parts of multipart / form-data
request and springdoc
also has this support, but when it's set, it doesn't appear in the result JSON
To Reproduce
@RestController
public class HelloController {
@PostMapping(value = "/test/103", consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
@Operation(
requestBody = @RequestBody(content = @Content(encoding = @Encoding(name = "body", contentType = "application/json")))
)
public String postMyRequestBody(
@RequestPart("body") ExampleBody body,
@RequestParam("file") MultipartFile file
) { return null; }
}
Expected behavior
In the JSON response, we should see additional section
"encoding":{ "body":{ "contentType":"application/json" } }
swistaczek, fkowal and wbaumann
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request