package net.contargo.iris.config;

import com.mangofactory.swagger.configuration.SpringSwaggerConfig;
import com.mangofactory.swagger.models.dto.ApiInfo;
import com.mangofactory.swagger.plugin.EnableSwagger;
import com.mangofactory.swagger.plugin.SwaggerSpringMvcPlugin;

import org.springframework.beans.factory.annotation.Autowired;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import org.springframework.ui.Model;


/**
 * @author  Sandra Thieme - thieme@synyx.de
 */
@Configuration
@EnableSwagger
public class SwaggerConfig {

    private SpringSwaggerConfig springSwaggerConfig;

    @Autowired
    public void setSpringSwaggerConfig(SpringSwaggerConfig springSwaggerConfig) {

        this.springSwaggerConfig = springSwaggerConfig;
    }


    @Bean
    public SwaggerSpringMvcPlugin customImplementation() {

        this.springSwaggerConfig.defaultSwaggerPathProvider().setApiResourcePrefix("api");

        return new SwaggerSpringMvcPlugin(this.springSwaggerConfig).apiInfo(apiInfo()).ignoredParameterTypes(
                Model.class);
    }


    private ApiInfo apiInfo() {

        return new ApiInfo("IRIS Backend Api", null, null, null, null, null);
    }
}

@@ -530,16 +530,65 @@
 ynyx.de%0A
+ * @author  David Schilling - schilling@synyx.de%0A
  */%0A@Con
@@ -639,24 +639,416 @@
 erConfig %7B%0A%0A
+    private String%5B%5D includePattern = new String%5B%5D %7B%0A        %22%5C%5C/geocodes.*%22, %22%5C%5C/osmaddresses.*%22, %22%5C%5C/places.*%22, %22%5C%5C/reversegeocode.*%22, %22%5C%5C/airlineDistance.*%22,%0A        %22%5C%5C/countries.*%22, %22%5C%5C/distancecloudaddress.*%22, %22%5C%5C/connections.*%22, %22%5C%5C/routedetails.*%22, %22%5C%5C/routerevisions.*%22,%0A        %22%5C%5C/routes.*%22, %22%5C%5C/seaports.*%22, %22%5C%5C/staticaddresses.*%22, %22%5C%5C/terminals.*%22, %22%5C%5C/simplegeocodes.*%22%0A    %7D;%0A%0A
     private 
@@ -1321,37 +1321,32 @@
 on() %7B%0A%0A        
-this.
 springSwaggerCon
@@ -1450,21 +1450,16 @@
 cPlugin(
-this.
 springSw
@@ -1489,16 +1489,74 @@
 iInfo())
+%0A            .includePatterns(includePattern)%0A            
 .ignored
@@ -1574,25 +1574,8 @@
 pes(
-%0A                
 Mode

Use include patterns for swagger to avoid unintended includes