From 5d4970dc3b96a6fd785680a8d06c70e4f7e0a9e8 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Sat, 11 Feb 2023 14:45:06 +0300 Subject: [PATCH] =?UTF-8?q?=D0=97=D0=B0=D0=BC=D0=B5=D0=BD=D0=B8=D0=BB=20Sw?= =?UTF-8?q?aggerConfig?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../example/swagger/config/OpenApiConfig.java | 23 ++++++++++++++ .../example/swagger/config/SwaggerConfig.java | 31 ------------------- ...application.properties => application.yml} | 0 3 files changed, 23 insertions(+), 31 deletions(-) create mode 100644 src/main/java/org/sadtech/example/swagger/config/OpenApiConfig.java delete mode 100644 src/main/java/org/sadtech/example/swagger/config/SwaggerConfig.java rename src/main/resources/{application.properties => application.yml} (100%) diff --git a/src/main/java/org/sadtech/example/swagger/config/OpenApiConfig.java b/src/main/java/org/sadtech/example/swagger/config/OpenApiConfig.java new file mode 100644 index 0000000..c092668 --- /dev/null +++ b/src/main/java/org/sadtech/example/swagger/config/OpenApiConfig.java @@ -0,0 +1,23 @@ +package org.sadtech.example.swagger.config; + +import io.swagger.v3.oas.annotations.OpenAPIDefinition; +import io.swagger.v3.oas.annotations.info.Contact; +import io.swagger.v3.oas.annotations.info.Info; + +/** + * @author upagge 30.12.2020 + */ +@OpenAPIDefinition( + info = @Info( + title = "Loyalty System Api", + description = "Loyalty System", version = "1.0.0", + contact = @Contact( + name = "Struchkov Mark", + email = "mark@struchkov.dev", + url = "https://mark.struchkov.dev" + ) + ) +) +public class OpenApiConfig { + +} diff --git a/src/main/java/org/sadtech/example/swagger/config/SwaggerConfig.java b/src/main/java/org/sadtech/example/swagger/config/SwaggerConfig.java deleted file mode 100644 index 2e555e3..0000000 --- a/src/main/java/org/sadtech/example/swagger/config/SwaggerConfig.java +++ /dev/null @@ -1,31 +0,0 @@ -package org.sadtech.example.swagger.config; - -import io.swagger.v3.oas.models.OpenAPI; -import io.swagger.v3.oas.models.info.Contact; -import io.swagger.v3.oas.models.info.Info; -import org.springframework.context.annotation.Bean; -import org.springframework.context.annotation.Configuration; - -/** - * @author upagge 30.12.2020 - */ -@Configuration -public class SwaggerConfig { - - @Bean - public OpenAPI customOpenAPI() { - return new OpenAPI() - .info( - new Info() - .title("Loyalty System Api") - .version("1.0.0") - .contact( - new Contact() - .email("mark@struchkov.dev") - .url("https://mark.struchkov.dev") - .name("Struchkov Mark") - ) - ); - } - -} diff --git a/src/main/resources/application.properties b/src/main/resources/application.yml similarity index 100% rename from src/main/resources/application.properties rename to src/main/resources/application.yml