Merge pull request 'feat(swagger): Bypass API 카탈로그 Swagger 딥링크 연동 (#142)' (#145) from feature/ISSUE-142-swagger-deeplink into develop
This commit is contained in:
커밋
20489558de
@ -12,6 +12,9 @@
|
|||||||
- 401 응답에 계정 상태 상세 메시지 포함
|
- 401 응답에 계정 상태 상세 메시지 포함
|
||||||
- Swagger UI Basic Auth 스킴 연동
|
- Swagger UI Basic Auth 스킴 연동
|
||||||
- 신청 폼 정규식 검증 및 접근기간 프리셋
|
- 신청 폼 정규식 검증 및 접근기간 프리셋
|
||||||
|
- Bypass API 카탈로그 Swagger 딥링크 연동 (#142)
|
||||||
|
- 카탈로그 테스트 버튼 클릭 시 해당 API로 Swagger UI 딥링크 이동
|
||||||
|
- Swagger UI deep-linking 활성화
|
||||||
|
|
||||||
## [2026-04-02]
|
## [2026-04-02]
|
||||||
|
|
||||||
|
|||||||
@ -36,7 +36,16 @@ const METHOD_COLORS: Record<string, string> = {
|
|||||||
DELETE: 'bg-red-100 text-red-700',
|
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() {
|
export default function BypassCatalog() {
|
||||||
const [configs, setConfigs] = useState<BypassConfig[]>([]);
|
const [configs, setConfigs] = useState<BypassConfig[]>([]);
|
||||||
@ -89,7 +98,7 @@ export default function BypassCatalog() {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
href={SWAGGER_URL}
|
href={SWAGGER_BASE}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="px-4 py-2 text-sm font-medium text-white bg-wing-accent hover:bg-wing-accent/80 rounded-lg transition-colors no-underline"
|
className="px-4 py-2 text-sm font-medium text-white bg-wing-accent hover:bg-wing-accent/80 rounded-lg transition-colors no-underline"
|
||||||
@ -236,7 +245,7 @@ export default function BypassCatalog() {
|
|||||||
)}
|
)}
|
||||||
<div className="pt-1 border-t border-wing-border mt-auto">
|
<div className="pt-1 border-t border-wing-border mt-auto">
|
||||||
<a
|
<a
|
||||||
href={SWAGGER_URL}
|
href={buildSwaggerDeepLink(config)}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="text-xs font-medium text-blue-500 hover:text-blue-600 no-underline transition-colors"
|
className="text-xs font-medium text-blue-500 hover:text-blue-600 no-underline transition-colors"
|
||||||
@ -291,7 +300,7 @@ export default function BypassCatalog() {
|
|||||||
</td>
|
</td>
|
||||||
<td className="px-4 py-3 text-right">
|
<td className="px-4 py-3 text-right">
|
||||||
<a
|
<a
|
||||||
href={SWAGGER_URL}
|
href={buildSwaggerDeepLink(config)}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noopener noreferrer"
|
rel="noopener noreferrer"
|
||||||
className="text-xs font-medium text-blue-500 hover:text-blue-600 no-underline transition-colors"
|
className="text-xs font-medium text-blue-500 hover:text-blue-600 no-underline transition-colors"
|
||||||
|
|||||||
@ -88,7 +88,7 @@ public class SwaggerConfig {
|
|||||||
.addOpenApiCustomizer(openApi -> {
|
.addOpenApiCustomizer(openApi -> {
|
||||||
openApi.info(new Info()
|
openApi.info(new Info()
|
||||||
.title("Bypass API")
|
.title("Bypass API")
|
||||||
.description("외부 연동용 S&P 데이터 Bypass API")
|
.description("S&P Global 선박/해운 데이터를 제공합니다.")
|
||||||
.version("v1.0.0"));
|
.version("v1.0.0"));
|
||||||
openApi.addSecurityItem(new SecurityRequirement().addList("basicAuth"));
|
openApi.addSecurityItem(new SecurityRequirement().addList("basicAuth"));
|
||||||
})
|
})
|
||||||
|
|||||||
@ -70,6 +70,12 @@ management:
|
|||||||
health:
|
health:
|
||||||
show-details: always
|
show-details: always
|
||||||
|
|
||||||
|
# Springdoc / Swagger UI
|
||||||
|
springdoc:
|
||||||
|
swagger-ui:
|
||||||
|
deep-linking: true
|
||||||
|
display-request-duration: true
|
||||||
|
|
||||||
# Logging Configuration (logback-spring.xml에서 상세 설정)
|
# Logging Configuration (logback-spring.xml에서 상세 설정)
|
||||||
logging:
|
logging:
|
||||||
config: classpath:logback-spring.xml
|
config: classpath:logback-spring.xml
|
||||||
|
|||||||
불러오는 중...
Reference in New Issue
Block a user