Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
{{#description}}{{{description}}}{{/description}}{{^description}}No description available.{{/description}}

{{/allParams}}
.PARAMETER WithHttpInfo

A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response

.OUTPUTS

{{#returnType}}{{{.}}}{{/returnType}}{{^returnType}}None{{/returnType}}
Expand All @@ -26,9 +30,11 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
[Parameter(Position = {{vendorExtensions.x-index}}{{#-first}}, ValueFromPipeline = $true{{/-first}}, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
[{{{vendorExtensions.x-powershell-data-type}}}]
{{=<% %>=}}
${<%paramName%>}<%^-last%>,<%/-last%>
${<%paramName%>},
<%={{ }}=%>
{{/allParams}}
[Switch]
$WithHttpInfo
)

Process {
Expand All @@ -42,7 +48,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
$LocalVarFormParameters = @{}
$LocalVarPathParameters = @{}
$LocalVarCookieParameters = @{}
$LocalVarBodyParameter
$LocalVarBodyParameter = $null

$Configuration = Get-{{{apiNamePrefix}}}Configuration
{{#hasProduces}}
Expand Down Expand Up @@ -194,7 +200,11 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
-CookieParameters $LocalVarCookieParameters `
-ReturnType "{{#returnType}}{{{.}}}{{/returnType}}"

return $LocalVarResult["Response"]
if ($WithHttpInfo.IsPresent) {
return $LocalVarResult
} else {
return $LocalVarResult["Response"]
}
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ function Invoke-{{{apiNamePrefix}}}ApiClient {
return @{
Response = DeserializeResponse -Response $Response -ReturnType $ReturnType
StatusCode = $Response.StatusCode
Headers = $Response.ResponseHeaders
Headers = $Response.Headers
}
}

Expand Down
Loading