Skip to content

Instantly share code, notes, and snippets.

@indrabasak
Last active July 25, 2017 18:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save indrabasak/ffc60effe1c7ed6930c34b37c7de7989 to your computer and use it in GitHub Desktop.
Save indrabasak/ffc60effe1c7ed6930c34b37c7de7989 to your computer and use it in GitHub Desktop.
Multi package Swagger configuration
@Configuration
@EnableSwagger2
public class MultiPackageSwaggerConfig {
@Bean
public Docket api() {
return new Docket(DocumentationType.SWAGGER_2)
.groupName("menagerie")
.select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build()
.apiInfo(apiInfo("Menagerie APIs",
"Exploring Swagger UI Features"));
}
private ApiInfo apiInfo(String title, String description) {
Contact contact = new Contact("Indra Basak", "",
"developer@gmail.com");
return new ApiInfo(title, description, "1.0", "terms of controller url",
contact, "license", "license url");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment