Prevent Swagger from automatically adding some models
问题 I build a REST interface using Spring Boot framework. Then, I use Swagger version 2.9.2 to generate the documentation. As you can see from the photo below, Swagger automatically detects a lot of models. However, most of them are redundant. Among them, only the ResponseMessage is necessary, the rest are just standard Java class. So, my question is: how can I tell Swagger which models to expose ? Here are my Swagger configuration and code snippet of my controller. @Bean public Docket api() {