From e04b0ee97a0796c9b24d1d378d4f1e8da8b1028b Mon Sep 17 00:00:00 2001 From: Simonas Karuzas Date: Mon, 19 Oct 2020 10:49:06 +0300 Subject: [PATCH] feat: CLI execute object type --- packages/daf-cli/src/execute.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/daf-cli/src/execute.ts b/packages/daf-cli/src/execute.ts index cffc9691f..0d9dd1813 100644 --- a/packages/daf-cli/src/execute.ts +++ b/packages/daf-cli/src/execute.ts @@ -61,6 +61,10 @@ program // TODO handle anyOf switch (propertySchema.type) { + case 'object': + question.type = 'input' + question.filter = (input: string) => JSON.parse(input === '' ? '{}' : input) + break case 'string': question.type = 'input' break @@ -72,7 +76,6 @@ program break // TODO case 'array': - case 'object': default: console.log(`Method argument type ${propertySchema.type} not supported yet`) process.exit(1)