Created
June 5, 2014 16:24
-
-
Save ctataryn/9dd16624d373851506af to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@EnableSwagger | |
@Configuration | |
public class SwaggerConfig { | |
@Autowired | |
private SpringSwaggerConfig springSwaggerConfig; | |
@Autowired | |
public void setSpringSwaggerConfig(SpringSwaggerConfig springSwaggerConfig) { | |
this.springSwaggerConfig = springSwaggerConfig; | |
} | |
@Bean | |
public SwaggerSpringMvcPlugin swaggerSpringMvcPlugin() { | |
return new SwaggerSpringMvcPlugin(springSwaggerConfig) | |
.swaggerGroup("my-api").includePatterns("/outages/.*") | |
.apiInfo(apiInfo()).build(); | |
} | |
/** | |
* API Info as it appears on the swagger-ui page | |
*/ | |
private ApiInfo apiInfo() { | |
ApiInfo apiInfo = new ApiInfo("My API", | |
"REST API for MyApp front-end", "", | |
"[email protected]", "", ""); | |
return apiInfo; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment