diff --git a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp index 62702a9..933edb2 100644 --- a/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiInterfaceManDetail.jsp @@ -510,6 +510,8 @@ $("#fromResponseAdapter").change(); $("#toResponseAdapter").change(); + + $("#apiFullPath").val(data["apiFullPath"]); // 스펙 전달용 값 }, error:function(e){ alert(e.responseText); @@ -931,7 +933,16 @@ function showApiSpecPopup() { var eaiSvcName = getFullSvcName(); - var args = {title:'API 스펙 관리', parent: true}; + var eaiSvcDesc = $('#eaiSvcDesc').val(); + var apipath = $('#apiFullPath').val(); + var contentType = $('#contentType').val(); + var args = { + title:'API 스펙 관리', + parent: true, + apipath : apipath, + eaiSvcDesc : eaiSvcDesc, + contentType : contentType + }; var popupUrl = url_spec + '?cmd=DETAIL&eaiSvcName=' + encodeURIComponent(eaiSvcName); showModal(popupUrl, args, 1200, 800); } @@ -1503,6 +1514,7 @@ + diff --git a/WebContent/jsp/onl/transaction/apim/apiSpecManPopup.jsp b/WebContent/jsp/onl/transaction/apim/apiSpecManPopup.jsp index 1243177..f4f6154 100644 --- a/WebContent/jsp/onl/transaction/apim/apiSpecManPopup.jsp +++ b/WebContent/jsp/onl/transaction/apim/apiSpecManPopup.jsp @@ -36,6 +36,7 @@ } else { buttonControl(false); } + initializeCodeMirror(); initializeSummernote(); } @@ -97,6 +98,7 @@ function detail(key) { // console.log('Before AJAX call, key:', key); // Log the key before the AJAX call + debugger; $.ajax({ type: "POST", url: url, @@ -150,6 +152,37 @@ // console.log('After setting apiId, key:', key); // Log the key after setting apiId buttonControl(true); + + // 조회된 Spec 데이터가 없다면 인터페이스 화면의 값을 세팅함. + if (!data.apiId) { + var args = window.dialogArguments; + + if (args && args.apipath) { + // HS04 의 fullpath 메서드/URL로 분리 + var rawString = args.apipath; + + var parts = rawString.split('|'); + + var method = parts[0].trim(); + var url = parts[1].trim(); + + if ($('#apiName').val() === "" && args.eaiSvcDesc) { + $('#apiName').val(args.eaiSvcDesc); + } + + if ($('#apiUrl').val() === "" && url) { + $('#apiUrl').val(url); + } + + if (method) { + $('#apiMethod').val(method); + } + + if ($('#apiContentType').val() === "" && args.contentType) { + $('#apiContentType').val(method); + } + } + } }, error: function (e) { console.error('AJAX error:', e); // Log any errors diff --git a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java index 7bbb2b9..899b46b 100644 --- a/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java +++ b/src/main/java/com/eactive/eai/rms/onl/transaction/apim/ApiInterfaceService.java @@ -248,6 +248,7 @@ public class ApiInterfaceService extends OnlBaseService { String stdKey = stdMessageUI.getBzwkSvcKeyName(); String inboundRestPath = StringUtils.substringAfter(stdKey, STEMSG_SERVICE_URL_DELIMITER); apiInterfaceUI.setInboundRestPath(inboundRestPath); + apiInterfaceUI.setApiFullPath(standardMessageInfo.getApifullpath()); apiInterfaceUI.setStandardMessageItems(stdMessageUI.getStandardMessageItems());