[Monitor Service | log4j]: SwaggerConfig.java: Updated swagger to add separate folders for libraries.

This commit is contained in:
Konstantina Galouni 2022-10-20 10:40:08 +03:00
parent 05aec3af4a
commit 5d46d84a96
1 changed files with 119 additions and 86 deletions

View File

@ -44,7 +44,40 @@ public class SwaggerConfig extends WebMvcConfigurerAdapter {
// .globalOperationParameters(globalParameterList())
.apiInfo(apiInfo())
.select()
.apis(RequestHandlerSelectors.any())
.apis(RequestHandlerSelectors.basePackage("eu.dnetlib.uoamonitorservice.controllers"))
.paths(PathSelectors.any())
.build();
}
@Bean
public Docket createRestApiLibrary() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.groupName("Library")
.select()
.apis(RequestHandlerSelectors.basePackage("eu.dnetlib.uoaadmintoolslibrary.controllers"))
.paths(PathSelectors.any())
.build();
}
@Bean
public Docket createRestApiAuthorizationLibrary() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.groupName("Authorization Library")
.select()
.apis(RequestHandlerSelectors.basePackage("eu.dnetlib.uoaauthorizationlibrary.controllers"))
.paths(PathSelectors.any())
.build();
}
@Bean
public Docket createRestApiNotificationLibrary() {
return new Docket(DocumentationType.SWAGGER_2)
.apiInfo(apiInfo())
.groupName("Notification Service")
.select()
.apis(RequestHandlerSelectors.basePackage("eu.dnetlib.uoanotificationservice.controllers"))
.paths(PathSelectors.any())
.build();
}