API Gateway Swagger 통합 문제 분석 완료

주요 문제점 식별:
- Gateway 라우팅 경로 불일치 (product-service: /products/**, bill-service: /api/v1/bills/**)
- OpenAPI 서버 정보와 실제 Gateway 경로 매핑 누락
- Swagger UI에서 "Try it out" 기능 미작동

다음 단계: 라우팅 경로 통일화 및 OpenAPI 서버 정보 수정 예정

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
hiondal
2025-09-10 10:45:59 +09:00
parent 02bcfa5434
commit 2a719048f8
16 changed files with 375 additions and 183 deletions
@@ -7,6 +7,7 @@ import io.swagger.v3.oas.models.info.Info;
import io.swagger.v3.oas.models.security.SecurityRequirement;
import io.swagger.v3.oas.models.security.SecurityScheme;
import io.swagger.v3.oas.models.servers.Server;
import org.springdoc.core.models.GroupedOpenApi;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@@ -39,9 +40,18 @@ public class SwaggerConfig {
.addServerVariable("port", new io.swagger.v3.oas.models.servers.ServerVariable()
._default("8084")
.description("Server port"))))
.addSecurityItem(new SecurityRequirement().addList("Bearer Authentication"))
.addSecurityItem(new SecurityRequirement().addList("bearerAuth"))
.components(new Components()
.addSecuritySchemes("Bearer Authentication", createAPIKeyScheme()));
.addSecuritySchemes("bearerAuth", createAPIKeyScheme()));
}
@Bean
public GroupedOpenApi kosApi() {
return GroupedOpenApi.builder()
.group("kos")
.displayName("KOS Mock Service")
.pathsToMatch("/api/v1/kos/**", "/api/v1/mock-datas/**")
.build();
}
private Info apiInfo() {
+4 -1
View File
@@ -27,6 +27,9 @@ spring:
server:
port: ${SERVER_PORT:8084}
# HTTP 헤더 크기 제한 설정
max-http-header-size: 64KB
max-http-request-header-size: 64KB
management:
endpoints:
@@ -58,7 +61,7 @@ logging:
# Swagger/OpenAPI
springdoc:
api-docs:
path: /api-docs
path: /v3/api-docs
swagger-ui:
path: /swagger-ui.html
tags-sorter: alpha