diff --git a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java index f403d4fce..6a0385656 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java +++ b/springdoc-openapi-starter-webmvc-api/src/test/java/test/org/springdoc/api/v30/app119/HelloController.java @@ -27,6 +27,8 @@ import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.media.Content; +import io.swagger.v3.oas.annotations.media.Encoding; +import io.swagger.v3.oas.annotations.parameters.RequestBody; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.PostMapping; @@ -44,6 +46,7 @@ public class HelloController { produces = MediaType.TEXT_PLAIN_VALUE) public String multiFilesInMultiPart( @RequestPart("params") + @RequestBody(content = @Content(encoding = @Encoding(name="params", contentType=MediaType.APPLICATION_JSON_VALUE))) @Parameter( description = "This is the configuration", content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE)) final JsonRequest jsonRequest, diff --git a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app119.json b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app119.json index a377e00fb..5f03c5312 100644 --- a/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app119.json +++ b/springdoc-openapi-starter-webmvc-api/src/test/resources/results/3.0.1/app119.json @@ -41,6 +41,11 @@ "$ref": "#/components/schemas/JsonRequest" } } + }, + "encoding": { + "params": { + "contentType": "application/json" + } } } }