support dynamic key with springfox swagger
up vote
1
down vote
favorite
@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
}
Unable to get below CURL equivalent using above Spring fox Swagger (2.9.2)
curl -X POST
http://localhost:8080/upload
-H 'Accept: application/json'
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
-F 'x1=@path1.txt'
-F 'x2=@path2.txt'
-F x3=val3
-F x4=val4
Needed support for dynamic keys equivalent to a controller that could accept Map<String,String>
, Map<String,MultipartFile>
both.
Won't it be possible before Open API 3 support is added to springfox swagger ?
java spring-boot swagger openapi springfox
add a comment |
up vote
1
down vote
favorite
@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
}
Unable to get below CURL equivalent using above Spring fox Swagger (2.9.2)
curl -X POST
http://localhost:8080/upload
-H 'Accept: application/json'
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
-F 'x1=@path1.txt'
-F 'x2=@path2.txt'
-F x3=val3
-F x4=val4
Needed support for dynamic keys equivalent to a controller that could accept Map<String,String>
, Map<String,MultipartFile>
both.
Won't it be possible before Open API 3 support is added to springfox swagger ?
java spring-boot swagger openapi springfox
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
@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
}
Unable to get below CURL equivalent using above Spring fox Swagger (2.9.2)
curl -X POST
http://localhost:8080/upload
-H 'Accept: application/json'
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
-F 'x1=@path1.txt'
-F 'x2=@path2.txt'
-F x3=val3
-F x4=val4
Needed support for dynamic keys equivalent to a controller that could accept Map<String,String>
, Map<String,MultipartFile>
both.
Won't it be possible before Open API 3 support is added to springfox swagger ?
java spring-boot swagger openapi springfox
@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
}
Unable to get below CURL equivalent using above Spring fox Swagger (2.9.2)
curl -X POST
http://localhost:8080/upload
-H 'Accept: application/json'
-H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
-F 'x1=@path1.txt'
-F 'x2=@path2.txt'
-F x3=val3
-F x4=val4
Needed support for dynamic keys equivalent to a controller that could accept Map<String,String>
, Map<String,MultipartFile>
both.
Won't it be possible before Open API 3 support is added to springfox swagger ?
java spring-boot swagger openapi springfox
java spring-boot swagger openapi springfox
edited Nov 8 at 18:33
asked Nov 8 at 17:40
fortm
1,75122461
1,75122461
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53213337%2fsupport-dynamic-key-with-springfox-swagger%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown