如何在swagger-ui(版本-2.9.2)中更新示例值

时间:2019-03-15 06:22:55

标签: swagger-ui spring-restcontroller

我有这个api。

@RequestMapping(value = "product/{id}", method = RequestMethod.PUT, produces = "application/json")
@ApiOperation("Update the person from the system and identifier is needed. 404 if product does not exist.")
public ResponseEntity<?> editProduct(   @ApiParam(example = "1") @PathVariable("id") int id,
                                        @RequestBody HashMap<String,String> productRequest)

在swagger-ui中,我想放置HashMap<String,String>的示例值。

我想换成

{
    "productName" : "....",
    "productDescription": "....",
    "productPrice" : 390
}

我该怎么做?

0 个答案:

没有答案