I am using springfox-swagger2
and springfox-swagger-ui
version 2.8.0
which was not exists in previous version 2.5.0
. I am seeing in this version there is an Example Value added in the request however, the example shows default as application/xml
as default .
@RequestMapping(value = "/",
produces = {"application/xml","application/json"},
consumes = {"application/xml", "application/json"}, method = RequestMethod.POST)
public ResponseEntity<?> addEmp(
@ApiParam(name = "request", value = "Payment Adding a new Employee Payload", required = true)
@Valid @RequestBody Employee request)
This Example Value is getting derived from the the Object Employee
and converting to either xml
, json
etc. My question is, is there any way the default value for Example Value can be defined in the drop down of from the multiple consuming object types defined in @RequestMapping's
consumes` array.
Screenshot