Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/spring-boot/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 通过springfox swagger支持动态键_Java_Spring Boot_Swagger_Openapi_Springfox - Fatal编程技术网

Java 通过springfox swagger支持动态键

Java 通过springfox swagger支持动态键,java,spring-boot,swagger,openapi,springfox,Java,Spring Boot,Swagger,Openapi,Springfox,无法使用以上Spring fox招摇过市(2.9.2)获得低于卷曲当量 需要支持相当于控制器的动态键,该控制器可以同时接受Map,Map 在springfox swagger中添加OpenAPI3支持之前,难道不可能吗 @ApiOperation(value = "Sample API") @ApiImplicitParams(value = { @ApiImplicitParam(dataType = "string", name = "x",, required =

无法使用以上Spring fox招摇过市(2.9.2)获得低于卷曲当量

需要支持相当于控制器的动态键,该控制器可以同时接受
Map
Map

在springfox swagger中添加OpenAPI3支持之前,难道不可能吗

@ApiOperation(value = "Sample API")
@ApiImplicitParams(value = {
            @ApiImplicitParam(dataType = "string", name = "x",, required = false, paramType = "form", allowMultiple = true),
            @ApiImplicitParam(dataType = "__file", name = "y", , required = false, paramType = "form", allowMultiple = true)
})
@PostMapping(value = "/{upload}", consumes = MediaType.MULTIPART_FORM_DATA_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
public ResponseEntity upload(HttpServletRequest request) {

    //process request

}
curl -X POST \
  http://localhost:8080/upload \
  -H 'Accept: application/json' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F 'x1=@path\1.txt' \
  -F 'x2=@path\2.txt' \
  -F x3=val3    \
  -F x4=val4