File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
springdoc-openapi-starter-webmvc-api/src/test
java/test/org/springdoc/api/v30/app119 Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 2727import io .swagger .v3 .oas .annotations .Operation ;
2828import io .swagger .v3 .oas .annotations .Parameter ;
2929import io .swagger .v3 .oas .annotations .media .Content ;
30+ import io .swagger .v3 .oas .annotations .media .Encoding ;
31+ import io .swagger .v3 .oas .annotations .parameters .RequestBody ;
3032
3133import org .springframework .http .MediaType ;
3234import org .springframework .web .bind .annotation .PostMapping ;
@@ -44,6 +46,7 @@ public class HelloController {
4446 produces = MediaType .TEXT_PLAIN_VALUE )
4547 public String multiFilesInMultiPart (
4648 @ RequestPart ("params" )
49+ @ RequestBody (content = @ Content (encoding = @ Encoding (name ="params" , contentType =MediaType .APPLICATION_JSON_VALUE )))
4750 @ Parameter (
4851 description = "This is the configuration" ,
4952 content = @ Content (mediaType = MediaType .APPLICATION_JSON_VALUE )) final JsonRequest jsonRequest ,
Original file line number Diff line number Diff line change 4141 "$ref" : " #/components/schemas/JsonRequest"
4242 }
4343 }
44+ },
45+ "encoding" : {
46+ "params" : {
47+ "contentType" : " application/json"
48+ }
4449 }
4550 }
4651 }
You can’t perform that action at this time.
0 commit comments