More api name & version with scripts (eg, running test scripts)

This commit is contained in:
2023-04-30 19:56:41 -05:00
parent 9ce45934a8
commit 15acaec523
11 changed files with 243 additions and 22 deletions

View File

@ -395,18 +395,18 @@ public class QJavalinScriptsHandler
String key = entry.getKey();
String value = entry.getValue().get(0);
if(key.equals("code"))
switch(key)
{
input.setCodeReference(new QCodeReference().withInlineCode(value).withCodeType(QCodeType.JAVA_SCRIPT));
}
else
{
inputValues.put(key, value);
case "code" -> input.setCodeReference(new QCodeReference().withInlineCode(value).withCodeType(QCodeType.JAVA_SCRIPT));
case "apiName" -> input.setApiName(value);
case "apiVersion" -> input.setApiVersion(value);
default -> inputValues.put(key, value);
}
}
TestScriptActionInterface scriptTester = QCodeLoader.getAdHoc(TestScriptActionInterface.class, scriptTesterCodeRef);
TestScriptOutput output = new TestScriptOutput();
scriptTester.execute(input, output);
QJavalinAccessLogger.logEndSuccess();