Last active
July 25, 2017 18:46
-
-
Save indrabasak/ffc60effe1c7ed6930c34b37c7de7989 to your computer and use it in GitHub Desktop.
Multi package Swagger configuration
This file contains 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
@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