aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/main/java')
-rw-r--r--framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java b/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java
index 1e202a54..90ac961e 100644
--- a/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java
+++ b/framework/src/main/java/org/onap/cli/fw/cmd/OnapHttpCommand.java
@@ -99,10 +99,10 @@ public class OnapHttpCommand extends OnapCommand {
for (OnapCommandResultAttribute attr : this.getResult().getRecords()) {
attr.setValues(results.get(attr.getName()));
}
- generateJsonMock(httpInput, output, this.getName());
+ generateJsonMock(httpInput, output, this.getSchemaName());
}
- private void generateJsonMock(HttpInput httpInput, HttpResult httpResult, String fileName)
+ private void generateJsonMock(HttpInput httpInput, HttpResult httpResult, String schemaName)
throws OnapCommandFailedMocoGenerate {
if (OnapCommandConfg.isSampleGenerateEnabled()) {
@@ -118,9 +118,9 @@ public class OnapHttpCommand extends OnapCommand {
mockResponse.setJson(httpResult.getBody());
MockJsonGenerator.generateMocking(mockRequest, mockResponse, OnapCommandConfg.getSampleGenerateTargetFolder()
- + "/" + fileName);
+ + "/" + schemaName.replace(".yaml", "") + "-moco.json");
} catch (IOException error) {
- throw new OnapCommandFailedMocoGenerate(fileName, error);
+ throw new OnapCommandFailedMocoGenerate(schemaName, error);
}
}
}