forked from loafle/openapi-generator-original
Fixed the empty string issue when server returns null (#7633)
This commit is contained in:
@@ -172,7 +172,7 @@ function DeserializeResponse {
|
||||
[string[]]$ContentTypes
|
||||
)
|
||||
|
||||
If ([string]::IsNullOrEmpty($ReturnType)) { # void response
|
||||
If ([string]::IsNullOrEmpty($ReturnType) -and $ContentTypes.Count -eq 0) { # void response
|
||||
return $Response
|
||||
} Elseif ($ReturnType -match '\[\]$') { # array
|
||||
return ConvertFrom-Json $Response
|
||||
|
||||
Reference in New Issue
Block a user