package tk.hishopapp.configs;

/**
 * Created by Nikita Bakaev, ya@nbakaev.ru on 1/11/2016.
 * All Rights Reserved
 */

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

@EnableSwagger2
@Configuration
public class SwaggerConfig {

    // ignore spring actuator endpoints
    private boolean checkInternal(String s) {
        return !(s.startsWith("/internal") || s.startsWith("/error"));
    }

    @Bean
    public Docket newsApi() {
        Docket docket = new Docket(DocumentationType.SWAGGER_2).select().build();
        docket = docket.select().paths(this::checkInternal).build();
        return docket;
    }

    private springfox.documentation.service.ApiInfo apiInfo() {
        return new ApiInfoBuilder()
                .build();
    }
}
@@ -239,65 +239,8 @@
 n;%0D%0A
-import springfox.documentation.builders.ApiInfoBuilder;%0D%0A
 impo
@@ -290,16 +290,16 @@
 nType;%0D%0A
+
 import s
@@ -594,37 +594,8 @@
 n !(
-s.startsWith(%22/internal%22) %7C%7C 
 s.st
@@ -847,26 +847,30 @@
 et;%0D%0A    %7D%0D%0A
-%0D%0A
+//%0D%0A//
     private 
@@ -918,24 +918,26 @@
 piInfo() %7B%0D%0A
+//
         retu
@@ -961,16 +961,18 @@
 lder()%0D%0A
+//
         
@@ -986,20 +986,22 @@
  .build();%0D%0A
+//
     %7D%0D%0A%7D

delete unused code