Skip to content
Snippets Groups Projects
Commit b2002697 authored by Jan Tymel's avatar Jan Tymel
Browse files

Add API info to swagger config

parent 39d59b37
No related branches found
No related tags found
No related merge requests found
......@@ -4,10 +4,14 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.Collections;
@Configuration
@EnableSwagger2
public class SwaggerConfig {
......@@ -17,6 +21,17 @@ public class SwaggerConfig {
return new Docket(DocumentationType.SWAGGER_2).select()
.apis(RequestHandlerSelectors.any())
.paths(PathSelectors.any())
.build();
.build()
.apiInfo(apiInfo());
}
private ApiInfo apiInfo() {
return new ApiInfo(
"Adaptive training definition",
"Swagger documentation of adaptive training definition REST endpoints v1",
"v1",
"https://docs.crp.kypo.muni.cz/license/",
new Contact("CSIRT team", "https://csirt.muni.cz/", "info@kypo.cz"),
"License", "https://docs.crp.kypo.muni.cz/license/", Collections.emptyList());
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment