Dear Student,when you config Swagger with springboot

Dear Student,when you config Swagger with springboot

When You use Swagger (3.0), by default, Swagger shows all Apis more than you developed (example error Api)

To resolve it, in your Swagger config Bean you can select only the packages that contains the controllers that you want to show:

In the exaple I only show the controllers at com.app.mypackagecontroller

@Configuration @EnableSwagger2 public class SwaggerConfig {

@Bean
public Docket api() {
    return new Docket(DocumentationType.SWAGGER_2)
            .select()
            .apis(RequestHandlerSelectors.basePackage("com.app.mypackagecontroller"))
            .build();
}