Bug Report Checklist
Description
The -WithHttpInfo uses the $Response.Headers['Content-Type'] which may not always be set. Therefore this may result in Null which is not accepted by the DeserializeResponse function.
openapi-generator version
v5.0.0
Steps to reproduce
- Generate any Powershell client
- Run -WithHttpInfo on an endpoint that doesnt set the content type
Suggest a fix
(ApiClient.ps1)
Either let DeserializeResponse accept null values or use the following for the content type:
$contentTypes = $Response.Headers["Content-Type"]
if ($null -eq $contentTypes) {
$contentTypes = [string[]]@()
}
# Use this in subsequent DeserializeResponse
Bug Report Checklist
Description
The
-WithHttpInfouses the$Response.Headers['Content-Type']which may not always be set. Therefore this may result in Null which is not accepted by the DeserializeResponse function.openapi-generator version
v5.0.0
Steps to reproduce
Suggest a fix
(ApiClient.ps1)
Either let DeserializeResponse accept null values or use the following for the content type: