Conditionally force array context when converting to JSON (#19262)

This commit is contained in:
condorcorde
2024-07-30 12:13:29 +02:00
committed by GitHub
parent d12cc0b63a
commit 16b28118cc
2 changed files with 7 additions and 2 deletions

View File

@@ -172,7 +172,12 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
{{/isNullable}}
{{/required}}
{{#isArray}}
$LocalVarBodyParameter = ,${{{paramName}}} | ConvertTo-Json -Depth 100
{{/isArray}}
{{^isArray}}
$LocalVarBodyParameter = ${{{paramName}}} | ConvertTo-Json -Depth 100
{{/isArray}}
{{/bodyParam}}
{{#authMethods}}