Skip to content

Commit ac262b1

Browse files
authored
Add support support for API, whose request body is just an object without specifying any details (#694)
1 parent ee9a568 commit ac262b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

powershell/plugins/create-commands-v2.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export /* @internal */ class Inferrer {
288288

289289
// let's add a variant where it's expanded out.
290290
// *IF* the body is an object or dictionary
291-
if (body.schema.type === SchemaType.Object || body.schema.type === SchemaType.Dictionary) {
291+
if (body.schema.type === SchemaType.Object || body.schema.type === SchemaType.Dictionary || body.schema.type === SchemaType.Any) {
292292
const opExpanded = await this.addCommandOperation(`${vname}Expanded`, parameters, operation, variant, state);
293293
opExpanded.details.default.dropBodyParameter = true;
294294
opExpanded.parameters.push(new IParameter(`${bodyParameterName}Body`, body.schema, {

0 commit comments

Comments
 (0)