-
-
Notifications
You must be signed in to change notification settings - Fork 541
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
If for example a @PostMapping
annotation on a RestController does not have the "consumes" variable set to anything, the org.springdoc.core.MethodAttributes.fillMethods
method uses org.springframework.http.MediaType.ALL_VALUE
as the value, which is */*
.
This results in Spring throwing an exception saying java.lang.IllegalArgumentException: Content-Type cannot contain wildcard type '*'
in org.springframework.http.HttpHeaders.setContentType
Could it be possible that instead of using */*
, you would instead fill the array with a set of MediaTypes so that one could choose in the Swagger-ui, or default to org.springframework.http.MediaType.APPLICATION_JSON_VALUE
if the class is a RestController?
sigurof, gruutak, bfs-natewallman, jonathanelvoe, rimonmostafiz and 1 more
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request