mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-03 14:10:56 +00:00
Conditionally force array context when converting to JSON (#19262)
This commit is contained in:
parent
d12cc0b63a
commit
16b28118cc
@ -172,7 +172,12 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
|
|||||||
|
|
||||||
{{/isNullable}}
|
{{/isNullable}}
|
||||||
{{/required}}
|
{{/required}}
|
||||||
|
{{#isArray}}
|
||||||
|
$LocalVarBodyParameter = ,${{{paramName}}} | ConvertTo-Json -Depth 100
|
||||||
|
{{/isArray}}
|
||||||
|
{{^isArray}}
|
||||||
$LocalVarBodyParameter = ${{{paramName}}} | ConvertTo-Json -Depth 100
|
$LocalVarBodyParameter = ${{{paramName}}} | ConvertTo-Json -Depth 100
|
||||||
|
{{/isArray}}
|
||||||
|
|
||||||
{{/bodyParam}}
|
{{/bodyParam}}
|
||||||
{{#authMethods}}
|
{{#authMethods}}
|
||||||
|
@ -133,7 +133,7 @@ function New-PSUsersWithArrayInput {
|
|||||||
throw "Error! The required parameter `User` missing when calling createUsersWithArrayInput."
|
throw "Error! The required parameter `User` missing when calling createUsersWithArrayInput."
|
||||||
}
|
}
|
||||||
|
|
||||||
$LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100
|
$LocalVarBodyParameter = ,$User | ConvertTo-Json -Depth 100
|
||||||
|
|
||||||
$LocalVarResult = Invoke-PSApiClient -Method 'POST' `
|
$LocalVarResult = Invoke-PSApiClient -Method 'POST' `
|
||||||
-Uri $LocalVarUri `
|
-Uri $LocalVarUri `
|
||||||
@ -208,7 +208,7 @@ function New-PSUsersWithListInput {
|
|||||||
throw "Error! The required parameter `User` missing when calling createUsersWithListInput."
|
throw "Error! The required parameter `User` missing when calling createUsersWithListInput."
|
||||||
}
|
}
|
||||||
|
|
||||||
$LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100
|
$LocalVarBodyParameter = ,$User | ConvertTo-Json -Depth 100
|
||||||
|
|
||||||
$LocalVarResult = Invoke-PSApiClient -Method 'POST' `
|
$LocalVarResult = Invoke-PSApiClient -Method 'POST' `
|
||||||
-Uri $LocalVarUri `
|
-Uri $LocalVarUri `
|
||||||
|
Loading…
x
Reference in New Issue
Block a user