io.springfox
springfox-swagger2
2.8.0
io.springfox
springfox-swagger-ui
2.8.0
<dependency>
<groupId>io.springfox</groupId>
<artifactId>springfox-spring-web</artifactId>
<version>2.8.0</version>
</dependency>
依赖版本号
这个版本不知支持Example用法,请问有什么解决的方式吗
@ApiOperation(value = "not use")
@ApiImplicitParam(name = "params" , paramType = "body",examples = @Example({
@ExampleProperty(value = "{'user':'id'}", mediaType = "application/json")
}))
@PostMapping("/xxx")
public void test(Map<String,String> params){}
效果是

有一个博主写过你看看能不能解决你的问题 https://blog.csdn.net/hellopeng1/article/details/82227942
@ApiImplicitParams({
@ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "body", required = true),
@ApiImplicitParam(name = "name", value = "名称", dataType = "String", paramType = "body", required = false),
@ApiImplicitParam(name = "gender", value = "性别", dataType = "String", paramType = "body", required = false) })
类似这样写吧?