From 46c46f7dbe0c400cb8a4970ebae15a2aa30d1024 Mon Sep 17 00:00:00 2001 From: derek Date: Mon, 12 Oct 2020 13:57:01 +0800 Subject: [PATCH] Add support support for API, whose request body is just an object without specifying any details --- powershell/plugins/create-commands-v2.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/powershell/plugins/create-commands-v2.ts b/powershell/plugins/create-commands-v2.ts index d1e71f4d10..d53d8132d1 100644 --- a/powershell/plugins/create-commands-v2.ts +++ b/powershell/plugins/create-commands-v2.ts @@ -288,7 +288,7 @@ export /* @internal */ class Inferrer { // let's add a variant where it's expanded out. // *IF* the body is an object or dictionary - if (body.schema.type === SchemaType.Object || body.schema.type === SchemaType.Dictionary) { + if (body.schema.type === SchemaType.Object || body.schema.type === SchemaType.Dictionary || body.schema.type === SchemaType.Any) { const opExpanded = await this.addCommandOperation(`${vname}Expanded`, parameters, operation, variant, state); opExpanded.details.default.dropBodyParameter = true; opExpanded.parameters.push(new IParameter(`${bodyParameterName}Body`, body.schema, {