Bug Report Checklist
Description
modules/openapi-generator/src/main/resources/powershell/api_client.mustache has
# construct URL query string
$HttpValues = [System.Web.HttpUtility]::ParseQueryString([String]::Empty)
foreach ($Parameter in $QueryParameters.GetEnumerator()) {
if ($Parameter.Value.Count -gt 1) { // array
foreach ($Value in $Parameter.Value) {
$HttpValues.Add($Parameter.Key + '[]', $Value)
}
} else {
$HttpValues.Add($Parameter.Key,$Parameter.Value)
}
}
That // array causes an exception:
Invoke-PSApiClient : The term '//' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
openapi-generator version
7.21.0 (been an issue for a long time by the looks of it)
Steps to reproduce
From the sample PowerStore client (samples/client/petstore/powershell) directory:
- .\Build.ps1
- Import-Module -Name '.\src\PSPetstore' -Verbose
- Find-PSPetsByStatus available,pending
Suggest a fix
Replace the // with # for the comment
Bug Report Checklist
Description
modules/openapi-generator/src/main/resources/powershell/api_client.mustache has
That
// arraycauses an exception:openapi-generator version
7.21.0 (been an issue for a long time by the looks of it)
Steps to reproduce
From the sample PowerStore client (samples/client/petstore/powershell) directory:
Suggest a fix
Replace the
//with#for the comment