Заменил SwaggerConfig

This commit is contained in:
Struchkov Mark 2023-02-11 14:45:06 +03:00
parent 3c956a976d
commit 5d4970dc3b
Signed by: upagge
GPG Key ID: D3018BE7BA428CA6
3 changed files with 23 additions and 31 deletions

View File

@ -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 {
}

View File

@ -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")
)
);
}
}