有没有办法在 swagger 的 @ApiResponse 注释中硬编码 "response"?

Is there a way to hardcode "response" in @ApiResponse annotation of swagger?

我的 api 方法之一有以下 Swagger 注释:

@ApiResponse(code = 200, message = "OK", response = String.class)

有什么方法可以对 response 进行硬编码?

在我的服务中保留任何域对象;我的服务是一种包装器服务,它与第三方供应商服务和 returns json 连接到调用者。 那么,有没有一种方法可以在 response 元素中对 json 模式进行硬编码?

我知道,如果我定义一个域对象并提及它的 .class,我将在输出中得到 json 模式,但正如我提到的,我需要找到一种方法 没有定义域对象。

同时在 message 属性中提供严格的 json 模式是没有意义的,因为我相信,这个属性更多地用于 描述 状态code,正确吗?

感谢提供任何pointers/suggestions。

我在其他论坛上得到的建议很少。

https://github.com/springfox/springfox/issues/1574