aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/com/juick/config
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2020-12-07 18:32:27 +0300
committerGravatar Vitaly Takmazov2020-12-07 18:33:10 +0300
commit8e9b670b272b8f030a1035cb7918e9fc0fea89a5 (patch)
tree79326bdfb119728a3dea37316c555ea2ca638a73 /src/test/java/com/juick/config
parent75b985391dc47d11edc87fee099a85dc30edd386 (diff)
springfox -> springdoc
Diffstat (limited to 'src/test/java/com/juick/config')
-rw-r--r--src/test/java/com/juick/config/SwaggerConfiguration.java31
1 files changed, 13 insertions, 18 deletions
diff --git a/src/test/java/com/juick/config/SwaggerConfiguration.java b/src/test/java/com/juick/config/SwaggerConfiguration.java
index f92ef6c0..d3eb7185 100644
--- a/src/test/java/com/juick/config/SwaggerConfiguration.java
+++ b/src/test/java/com/juick/config/SwaggerConfiguration.java
@@ -17,29 +17,24 @@
package com.juick.config;
-import com.google.common.base.Predicates;
+import io.swagger.v3.oas.models.OpenAPI;
+import io.swagger.v3.oas.models.info.Info;
+import io.swagger.v3.oas.models.info.License;
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.spi.DocumentationType;
-import springfox.documentation.spring.web.plugins.Docket;
-import springfox.documentation.swagger2.annotations.EnableSwagger2;
-
-import java.util.Collections;
@Configuration
-@EnableSwagger2
public class SwaggerConfiguration {
@Bean
- public Docket api() {
- return new Docket(DocumentationType.SWAGGER_2)
- .host("api.juick.com")
- .select()
- .apis(Predicates.not(Predicates.or(RequestHandlerSelectors.basePackage("org.springframework.boot"), RequestHandlerSelectors.basePackage("com.juick.server.www"))))
- .paths(PathSelectors.any()).build().apiInfo(new ApiInfo("Juick API", "Juick REST API Documentation",
- "2.0", "https://juick.com/help/tos", null,
- "AGPLv3", "https://www.gnu.org/licenses/agpl-3.0.html", Collections.emptyList()));
+ public OpenAPI api() {
+ return new OpenAPI()
+ .info(new Info()
+ .title("Juick API")
+ .version("2.0")
+ .description("Juick Rest API Documentation")
+ .termsOfService("https://juick.com/help/tos")
+ .license(new License()
+ .name("AGPLv3")
+ .url("https://www.gnu.org/licenses/agpl-3.0.html")));
}
}