将springfox迁移到带有注释的springdoc openapi ui问题



Spring fox:

@ApiOperation(value = "Gets the status for ID",
consumes = "application/json",
produces = "application/json",
response = xyz.class)

Springdoc:

@Operation(summary = "Gets the status for ID",
consumes = "application/json",
produces = "application/json",
response = xyz.class)

在这里,我可以用summary代替value,但不知道用什么来代替consumesproducesresponse,有人能帮忙吗?

我尝试使用@Tags,但它不起作用。有人能为这个问题提出一个解决方案吗?

我已经使用@RouterOperation来解决我的问题

@RouterOperation(operation = @Operation(summary = "Gets the status for ID"),
consumes = "application/json",
produces = "application/json",
parameterTypes = xyz.class)

相关内容

  • 没有找到相关文章

最新更新