mirror of
https://github.com/cna-bootcamp/phonebill.git
synced 2026-06-12 19:49:10 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -44,6 +45,15 @@ public class SwaggerConfig {
|
||||
.addSecuritySchemes("bearerAuth", createAPIKeyScheme()));
|
||||
}
|
||||
|
||||
@Bean
|
||||
public GroupedOpenApi productApi() {
|
||||
return GroupedOpenApi.builder()
|
||||
.group("product")
|
||||
.displayName("Product Service")
|
||||
.pathsToMatch("/products/**", "/product/**")
|
||||
.build();
|
||||
}
|
||||
|
||||
private Info apiInfo() {
|
||||
return new Info()
|
||||
.title("Product Service API")
|
||||
|
||||
@@ -54,6 +54,9 @@ spring:
|
||||
# Server 개발 설정
|
||||
server:
|
||||
port: ${SERVER_PORT:8083}
|
||||
# HTTP 헤더 크기 제한 설정
|
||||
max-http-header-size: 64KB
|
||||
max-http-request-header-size: 64KB
|
||||
error:
|
||||
include-stacktrace: always
|
||||
include-message: always
|
||||
@@ -117,7 +120,7 @@ management:
|
||||
springdoc:
|
||||
api-docs:
|
||||
enabled: true
|
||||
path: /api-docs
|
||||
path: /v3/api-docs
|
||||
swagger-ui:
|
||||
enabled: true
|
||||
path: /swagger-ui.html
|
||||
|
||||
Reference in New Issue
Block a user