Skip to content

Commit

Permalink
Swagger Gateway 통합
Browse files Browse the repository at this point in the history
  • Loading branch information
j-ra1n committed Jan 17, 2025
1 parent f012435 commit 748501c
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ dependencies {
annotationProcessor "jakarta.persistence:jakarta.persistence-api"

// Swagger
implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.7.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.1.0'
}


Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
package io.urdego.urdego_content_service.common.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 io.swagger.v3.oas.models.info.License;
import io.swagger.v3.oas.models.servers.Server;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import java.util.List;

@Configuration
public class SwaggerConfig {

@Bean
public OpenAPI customOpenAPI() {
return new OpenAPI()
.info(new Info()
.title("어데고 컨텐츠 API")
.version("v3")
.description("어데고 컨텐츠 서버")
.contact(new Contact()
.name("📍 어데고 GitHub Link")
.url("https://github.com/urdego"))
.license(new License()
.name("⚖️ Apache License Version 2.0")
.url("http://www.apache.org/licenses/LICENSE-2.0")))

.servers(List.of(
new Server().url("http://localhost:8081"),
new Server().url("https://urdego.site")
));
}
}

0 comments on commit 748501c

Please sign in to comment.