我正在关注Swagger 2.0 Annotation docs,但是无法为body添加示例值。
public Response updateUserInfo(@RequestBody(description = "", required = true, content = @Content(mediaType = "application/json")}) final String userInfo)
正文是否有@ApiImplicitParams
或@ExampleProperty
的等效项。
尽管以上文档给出了@ApiResponse
的示例:
examples = { @ExampleObject(name = "boo", value = "example",summary = "example of boo", externalValue = "example of external value") }
但这不适用于身体。
我也尝试过此操作,但示例未显示:
public Response updateUserInfo(@@Parameter(examples = {@ExampleObject(name = "userInfo", value = "some example")})) final String userInfo)