diff --git a/docs/RELEASE-NOTES.md b/docs/RELEASE-NOTES.md index c6fe4a6..56691cb 100644 --- a/docs/RELEASE-NOTES.md +++ b/docs/RELEASE-NOTES.md @@ -12,6 +12,9 @@ - 401 응답에 계정 상태 상세 메시지 포함 - Swagger UI Basic Auth 스킴 연동 - 신청 폼 정규식 검증 및 접근기간 프리셋 +- Bypass API 카탈로그 Swagger 딥링크 연동 (#142) + - 카탈로그 테스트 버튼 클릭 시 해당 API로 Swagger UI 딥링크 이동 + - Swagger UI deep-linking 활성화 ## [2026-04-02] diff --git a/frontend/src/pages/BypassCatalog.tsx b/frontend/src/pages/BypassCatalog.tsx index e74e7f7..eb2279a 100644 --- a/frontend/src/pages/BypassCatalog.tsx +++ b/frontend/src/pages/BypassCatalog.tsx @@ -36,7 +36,16 @@ const METHOD_COLORS: Record = { DELETE: 'bg-red-100 text-red-700', }; -const SWAGGER_URL = '/snp-api/swagger-ui/index.html?urls.primaryName=3.%20Bypass%20API'; +const SWAGGER_BASE = '/snp-api/swagger-ui/index.html?urls.primaryName=3.%20Bypass%20API'; + +function buildSwaggerDeepLink(config: BypassConfig): string { + // Swagger UI deep link: #/{Tag}/{operationId} + // Tag = domainName 첫글자 대문자 (예: compliance → Compliance) + // operationId = get{EndpointName}Data (SpringDoc 기본 패턴) + const tag = config.domainName.charAt(0).toUpperCase() + config.domainName.slice(1); + const operationId = `get${config.endpointName}Data`; + return `${SWAGGER_BASE}#/${tag}/${operationId}`; +} export default function BypassCatalog() { const [configs, setConfigs] = useState([]); @@ -89,7 +98,7 @@ export default function BypassCatalog() {

{ openApi.info(new Info() .title("Bypass API") - .description("외부 연동용 S&P 데이터 Bypass API") + .description("S&P Global 선박/해운 데이터를 제공합니다.") .version("v1.0.0")); openApi.addSecurityItem(new SecurityRequirement().addList("basicAuth")); }) diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml index 15de717..ce28d9a 100644 --- a/src/main/resources/application.yml +++ b/src/main/resources/application.yml @@ -70,6 +70,12 @@ management: health: show-details: always +# Springdoc / Swagger UI +springdoc: + swagger-ui: + deep-linking: true + display-request-duration: true + # Logging Configuration (logback-spring.xml에서 상세 설정) logging: config: classpath:logback-spring.xml