如何使用Springfox和Swagger生成模板方法的文档?

时间:2019-12-11 07:30:14

标签: java swagger swagger-ui swagger-2.0 springfox

我有一个使用Spring Boot编写的微服务,我需要为其生成文档。我为此使用springfox,但是我不知道如何为模板方法生成文档。我有以下课程:

@io.swagger.annotations.Api(tags = {"MyController"})
@RestController
public class MyController {
    public <I extends MyModel> handleRequest(@ApiIgnore RequestEntity<String> request) {
        ...
    }
}

request可以使用不同类型的数据,我需要依靠这些数据生成文档。例如,我可以获得MyModelRequest1MyModelRequest2等,我需要生成将包含所有这些变体的文档。 谁能帮我吗?

0 个答案:

没有答案