fix: Scaffold 생성 시 execute() 대신 Tool 이름 기반 카멜케이스 함수명 사용하도록 변경
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 0s
Some checks failed
Deploy to OCIWP / deploy (push) Failing after 0s
This commit is contained in:
@@ -855,6 +855,8 @@ public class ToolScaffolder {
|
|||||||
baseName, baseName
|
baseName, baseName
|
||||||
);
|
);
|
||||||
|
|
||||||
|
String methodName = Character.toLowerCase(baseName.charAt(0)) + baseName.substring(1);
|
||||||
|
serviceInterfaceContent = serviceInterfaceContent.replace("execute(", methodName + "(");
|
||||||
writeUtf8(usecaseDir.resolve(baseName + "UseCase.java"), serviceInterfaceContent);
|
writeUtf8(usecaseDir.resolve(baseName + "UseCase.java"), serviceInterfaceContent);
|
||||||
|
|
||||||
String serviceImplContent;
|
String serviceImplContent;
|
||||||
@@ -1043,6 +1045,7 @@ public class ToolScaffolder {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
serviceImplContent = serviceImplContent.replace("execute(", methodName + "(");
|
||||||
writeUtf8(usecaseImplDir.resolve(baseName + "UseCaseImpl.java"), serviceImplContent);
|
writeUtf8(usecaseImplDir.resolve(baseName + "UseCaseImpl.java"), serviceImplContent);
|
||||||
|
|
||||||
if (isMci) {
|
if (isMci) {
|
||||||
@@ -1839,7 +1842,8 @@ public class ToolScaffolder {
|
|||||||
String httpResponseClass = baseName + "HttpResponse";
|
String httpResponseClass = baseName + "HttpResponse";
|
||||||
String httpClientClass = httpApiClass + "Client";
|
String httpClientClass = httpApiClass + "Client";
|
||||||
String clientVariable = Character.toLowerCase(httpClientClass.charAt(0)) + httpClientClass.substring(1);
|
String clientVariable = Character.toLowerCase(httpClientClass.charAt(0)) + httpClientClass.substring(1);
|
||||||
return """
|
String methodName = Character.toLowerCase(baseName.charAt(0)) + baseName.substring(1);
|
||||||
|
String result = """
|
||||||
package %s.usecase.impl;
|
package %s.usecase.impl;
|
||||||
|
|
||||||
import %s.converter.%sConverter;
|
import %s.converter.%sConverter;
|
||||||
@@ -1884,6 +1888,7 @@ public class ToolScaffolder {
|
|||||||
baseName, baseName,
|
baseName, baseName,
|
||||||
httpRequestClass, httpResponseClass, clientVariable, httpResponseClass,
|
httpRequestClass, httpResponseClass, clientVariable, httpResponseClass,
|
||||||
baseName);
|
baseName);
|
||||||
|
return result.replace("execute(", methodName + "(");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String httpClientContent(String httpPackage, String clientClass, String apiName) {
|
private static String httpClientContent(String httpPackage, String clientClass, String apiName) {
|
||||||
|
|||||||
Reference in New Issue
Block a user