http://jira.mfd.msk:8088/browse/CLS-301 swagger fix
This commit is contained in:
parent
d5c6123575
commit
7e8566cb14
1 changed files with 37 additions and 0 deletions
|
|
@ -0,0 +1,37 @@
|
||||||
|
package ru.spcex.clearing.gatewayapi.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import springfox.documentation.builders.ApiInfoBuilder;
|
||||||
|
import springfox.documentation.builders.PathSelectors;
|
||||||
|
import springfox.documentation.builders.RequestHandlerSelectors;
|
||||||
|
import springfox.documentation.service.ApiInfo;
|
||||||
|
import springfox.documentation.spi.DocumentationType;
|
||||||
|
import springfox.documentation.spring.web.plugins.Docket;
|
||||||
|
import springfox.documentation.swagger2.annotations.EnableSwagger2;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
@EnableSwagger2
|
||||||
|
public class SwaggerConfig {
|
||||||
|
|
||||||
|
@Bean
|
||||||
|
public Docket api() {
|
||||||
|
return new Docket(DocumentationType.SWAGGER_2)
|
||||||
|
.groupName("clearing-gateway-api")
|
||||||
|
.apiInfo(metadata())
|
||||||
|
.select()
|
||||||
|
.apis(RequestHandlerSelectors.basePackage("ru.spcex.clearing.gatewayapi.controller"))
|
||||||
|
.paths(PathSelectors.any())
|
||||||
|
.build()
|
||||||
|
.useDefaultResponseMessages(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private ApiInfo metadata() {
|
||||||
|
return new ApiInfoBuilder()
|
||||||
|
.title("Spcex Gateway service")
|
||||||
|
.description("gateway-api")
|
||||||
|
.version("0.0.1")
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Reference in a new issue