forked from loafle/openapi-generator-original
null check on $ContentTypes (#9687)
This commit is contained in:
parent
7125ef43f5
commit
37b7c80c4f
@ -211,6 +211,10 @@ function DeserializeResponse {
|
|||||||
[string[]]$ContentTypes
|
[string[]]$ContentTypes
|
||||||
)
|
)
|
||||||
|
|
||||||
|
If ($ContentTypes -eq $null) {
|
||||||
|
$ContentTypes = [string[]]@()
|
||||||
|
}
|
||||||
|
|
||||||
If ([string]::IsNullOrEmpty($ReturnType) -and $ContentTypes.Count -eq 0) { # void response
|
If ([string]::IsNullOrEmpty($ReturnType) -and $ContentTypes.Count -eq 0) { # void response
|
||||||
return $Response
|
return $Response
|
||||||
} Elseif ($ReturnType -match '\[\]$') { # array
|
} Elseif ($ReturnType -match '\[\]$') { # array
|
||||||
|
@ -198,6 +198,10 @@ function DeserializeResponse {
|
|||||||
[string[]]$ContentTypes
|
[string[]]$ContentTypes
|
||||||
)
|
)
|
||||||
|
|
||||||
|
If ($ContentTypes -eq $null) {
|
||||||
|
$ContentTypes = [string[]]@()
|
||||||
|
}
|
||||||
|
|
||||||
If ([string]::IsNullOrEmpty($ReturnType) -and $ContentTypes.Count -eq 0) { # void response
|
If ([string]::IsNullOrEmpty($ReturnType) -and $ContentTypes.Count -eq 0) { # void response
|
||||||
return $Response
|
return $Response
|
||||||
} Elseif ($ReturnType -match '\[\]$') { # array
|
} Elseif ($ReturnType -match '\[\]$') { # array
|
||||||
|
Loading…
x
Reference in New Issue
Block a user