File tree 4 files changed +8
-8
lines changed
modules/openapi-generator/src/main/resources/powershell
echo_api/powershell/src/PSOpenAPITools/Api
petstore/powershell/src/PSPetstore/Api
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -147,7 +147,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
147
147
throw " Error! The required parameter `{{paramName}}` missing when calling {{operationId}}."
148
148
}
149
149
{ {#isFile} }
150
- $LocalVarFormParameters['{ {baseName} }'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(${ {{paramName } }})
150
+ $LocalVarFormParameters['{ {baseName} }'] = ${ {{paramName } }} | Foreach-Object { [System.IO.FileInfo] $ executionContext .SessionState.Path.GetUnresolvedProviderPathFromPSPath($_ ) }
151
151
{ {/isFile} }
152
152
{ {^isFile} }
153
153
$LocalVarFormParameters['{ {baseName} }'] = ${ {{paramName} }}
@@ -159,7 +159,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
159
159
{ {^isNullable} }
160
160
if (${ {{paramName} }}) {
161
161
{{#isFile} }
162
- $LocalVarFormParameters['{ {baseName} }'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(${ {{paramName } }})
162
+ $LocalVarFormParameters['{ {baseName} }'] = ${ {{paramName } }} | Foreach-Object { [System.IO.FileInfo] $ executionContext .SessionState.Path.GetUnresolvedProviderPathFromPSPath($_ ) }
163
163
{ {/isFile} }
164
164
{ {^isFile} }
165
165
$LocalVarFormParameters['{ {baseName} }'] = ${ {{paramName} }}
@@ -169,7 +169,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
169
169
{ {/isNullable} }
170
170
{ {#isNullable} }
171
171
{ {#isFile} }
172
- $LocalVarFormParameters['{ {baseName} }'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(${ {{paramName } }})
172
+ $LocalVarFormParameters['{ {baseName} }'] = ${ {{paramName } }} | Foreach-Object { [System.IO.FileInfo] $ executionContext .SessionState.Path.GetUnresolvedProviderPathFromPSPath($_ ) }
173
173
{ {/isFile} }
174
174
{ {^isFile} }
175
175
$LocalVarFormParameters['{ {baseName} }'] = ${ {{paramName} }}
Original file line number Diff line number Diff line change @@ -198,7 +198,7 @@ function Test-BodyMultipartFormdataArrayOfBinary {
198
198
if (! $Files ) {
199
199
throw " Error! The required parameter `Files` missing when calling test_body_multipart_formdata_arrayOfBinary."
200
200
}
201
- $LocalVarFormParameters [' files' ] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($Files )
201
+ $LocalVarFormParameters [' files' ] = $Files | Foreach-Object { [ System.IO.FileInfo ] $ executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($_ ) }
202
202
203
203
$LocalVarResult = Invoke-ApiClient - Method ' POST' `
204
204
- Uri $LocalVarUri `
@@ -273,7 +273,7 @@ function Test-BodyMultipartFormdataSingleBinary {
273
273
$LocalVarUri = ' /body/application/octetstream/single_binary'
274
274
275
275
if ($MyFile ) {
276
- $LocalVarFormParameters [' my-file' ] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($MyFile )
276
+ $LocalVarFormParameters [' my-file' ] = $MyFile | Foreach-Object { [ System.IO.FileInfo ] $ executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($_ ) }
277
277
}
278
278
279
279
$LocalVarResult = Invoke-ApiClient - Method ' POST' `
Original file line number Diff line number Diff line change @@ -909,7 +909,7 @@ function Test-PSEndpointParameters {
909
909
$LocalVarFormParameters [' byte' ] = $Byte
910
910
911
911
if ($Binary ) {
912
- $LocalVarFormParameters [' binary' ] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($Binary )
912
+ $LocalVarFormParameters [' binary' ] = $Binary | Foreach-Object { [ System.IO.FileInfo ] $ executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($_ ) }
913
913
}
914
914
915
915
if ($Date ) {
Original file line number Diff line number Diff line change @@ -679,7 +679,7 @@ function Invoke-PSUploadFile {
679
679
}
680
680
681
681
if ($File ) {
682
- $LocalVarFormParameters [' file' ] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($File )
682
+ $LocalVarFormParameters [' file' ] = $File | Foreach-Object { [ System.IO.FileInfo ] $ executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($_ ) }
683
683
}
684
684
685
685
@@ -778,7 +778,7 @@ function Invoke-PSUploadFileWithRequiredFile {
778
778
if (! $RequiredFile ) {
779
779
throw " Error! The required parameter `RequiredFile` missing when calling uploadFileWithRequiredFile."
780
780
}
781
- $LocalVarFormParameters [' requiredFile' ] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($RequiredFile )
781
+ $LocalVarFormParameters [' requiredFile' ] = $RequiredFile | Foreach-Object { [ System.IO.FileInfo ] $ executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath ($_ ) }
782
782
783
783
784
784
$LocalVarResult = Invoke-PSApiClient - Method ' POST' `
You can’t perform that action at this time.
0 commit comments