fix the json depth for nested object (#6787)

Co-authored-by: Author <>
This commit is contained in:
Ghufz 2020-06-27 07:42:26 +05:30 committed by GitHub
parent 720ab3d39b
commit f1142948c0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 10 deletions

View File

@ -172,7 +172,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
{{/isNullable}}
{{/required}}
$LocalVarBodyParameter = ${{{paramName}}} | ConvertTo-Json
$LocalVarBodyParameter = ${{{paramName}}} | ConvertTo-Json -Depth 100
{{/bodyParam}}
{{#authMethods}}
@ -225,12 +225,12 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
{{#vendorExtensions.x-ps-return-type-one-of}}
# process oneOf response
$LocalVarResult["Response"] = ConvertFrom-{{apiNamePrefix}}JsonTo{{returnType}} (ConvertTo-Json $LocalVarResult["Response"])
$LocalVarResult["Response"] = ConvertFrom-{{apiNamePrefix}}JsonTo{{returnType}} (ConvertTo-Json $LocalVarResult["Response"] -Depth 100)
{{/vendorExtensions.x-ps-return-type-one-of}}
{{#vendorExtensions.x-ps-return-type-any-of}}
# process anyOf response
$LocalVarResult["Response"] = ConvertFrom-{{apiNamePrefix}}JsonTo{{returnType}} (ConvertTo-Json $LocalVarResult["Response"])
$LocalVarResult["Response"] = ConvertFrom-{{apiNamePrefix}}JsonTo{{returnType}} (ConvertTo-Json $LocalVarResult["Response"] -Depth 100)
{{/vendorExtensions.x-ps-return-type-any-of}}
if ($WithHttpInfo.IsPresent) {

View File

@ -73,7 +73,7 @@ function Add-PSPet {
throw "Error! The required parameter `Pet` missing when calling addPet."
}
$LocalVarBodyParameter = $Pet | ConvertTo-Json
$LocalVarBodyParameter = $Pet | ConvertTo-Json -Depth 100
$LocalVarResult = Invoke-PSApiClient -Method 'POST' `
@ -505,7 +505,7 @@ function Update-PSPet {
throw "Error! The required parameter `Pet` missing when calling updatePet."
}
$LocalVarBodyParameter = $Pet | ConvertTo-Json
$LocalVarBodyParameter = $Pet | ConvertTo-Json -Depth 100
$LocalVarResult = Invoke-PSApiClient -Method 'PUT' `

View File

@ -293,7 +293,7 @@ function Invoke-PSPlaceOrder {
throw "Error! The required parameter `Order` missing when calling placeOrder."
}
$LocalVarBodyParameter = $Order | ConvertTo-Json
$LocalVarBodyParameter = $Order | ConvertTo-Json -Depth 100
$LocalVarResult = Invoke-PSApiClient -Method 'POST' `
-Uri $LocalVarUri `

View File

@ -58,7 +58,7 @@ function New-PSUser {
throw "Error! The required parameter `User` missing when calling createUser."
}
$LocalVarBodyParameter = $User | ConvertTo-Json
$LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100
if ($Configuration["Cookie"]) {
$LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"]
@ -137,7 +137,7 @@ function New-PSUsersWithArrayInput {
throw "Error! The required parameter `User` missing when calling createUsersWithArrayInput."
}
$LocalVarBodyParameter = $User | ConvertTo-Json
$LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100
if ($Configuration["Cookie"]) {
$LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"]
@ -216,7 +216,7 @@ function New-PSUsersWithListInput {
throw "Error! The required parameter `User` missing when calling createUsersWithListInput."
}
$LocalVarBodyParameter = $User | ConvertTo-Json
$LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100
if ($Configuration["Cookie"]) {
$LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"]
@ -623,7 +623,7 @@ function Update-PSUser {
throw "Error! The required parameter `User` missing when calling updateUser."
}
$LocalVarBodyParameter = $User | ConvertTo-Json
$LocalVarBodyParameter = $User | ConvertTo-Json -Depth 100
if ($Configuration["Cookie"]) {
$LocalVarCookieParameters['auth_cookie'] = $Configuration["Cookie"]