mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-05-12 12:40:53 +00:00
Support multiple files (#19449)
This commit is contained in:
parent
f13a11b53c
commit
fe381e2199
@ -147,7 +147,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
|
|||||||
throw "Error! The required parameter `{{paramName}}` missing when calling {{operationId}}."
|
throw "Error! The required parameter `{{paramName}}` missing when calling {{operationId}}."
|
||||||
}
|
}
|
||||||
{{#isFile}}
|
{{#isFile}}
|
||||||
$LocalVarFormParameters['{{baseName}}'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(${{{paramName}}})
|
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}} | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
|
||||||
{{/isFile}}
|
{{/isFile}}
|
||||||
{{^isFile}}
|
{{^isFile}}
|
||||||
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}}
|
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}}
|
||||||
@ -159,7 +159,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
|
|||||||
{{^isNullable}}
|
{{^isNullable}}
|
||||||
if (${{{paramName}}}) {
|
if (${{{paramName}}}) {
|
||||||
{{#isFile}}
|
{{#isFile}}
|
||||||
$LocalVarFormParameters['{{baseName}}'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(${{{paramName}}})
|
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}} | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
|
||||||
{{/isFile}}
|
{{/isFile}}
|
||||||
{{^isFile}}
|
{{^isFile}}
|
||||||
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}}
|
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}}
|
||||||
@ -169,7 +169,7 @@ function {{{vendorExtensions.x-powershell-method-name}}} {
|
|||||||
{{/isNullable}}
|
{{/isNullable}}
|
||||||
{{#isNullable}}
|
{{#isNullable}}
|
||||||
{{#isFile}}
|
{{#isFile}}
|
||||||
$LocalVarFormParameters['{{baseName}}'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath(${{{paramName}}})
|
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}} | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
|
||||||
{{/isFile}}
|
{{/isFile}}
|
||||||
{{^isFile}}
|
{{^isFile}}
|
||||||
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}}
|
$LocalVarFormParameters['{{baseName}}'] = ${{{paramName}}}
|
||||||
|
@ -198,7 +198,7 @@ function Test-BodyMultipartFormdataArrayOfBinary {
|
|||||||
if (!$Files) {
|
if (!$Files) {
|
||||||
throw "Error! The required parameter `Files` missing when calling test_body_multipart_formdata_arrayOfBinary."
|
throw "Error! The required parameter `Files` missing when calling test_body_multipart_formdata_arrayOfBinary."
|
||||||
}
|
}
|
||||||
$LocalVarFormParameters['files'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Files)
|
$LocalVarFormParameters['files'] = $Files | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
|
||||||
|
|
||||||
$LocalVarResult = Invoke-ApiClient -Method 'POST' `
|
$LocalVarResult = Invoke-ApiClient -Method 'POST' `
|
||||||
-Uri $LocalVarUri `
|
-Uri $LocalVarUri `
|
||||||
@ -273,7 +273,7 @@ function Test-BodyMultipartFormdataSingleBinary {
|
|||||||
$LocalVarUri = '/body/application/octetstream/single_binary'
|
$LocalVarUri = '/body/application/octetstream/single_binary'
|
||||||
|
|
||||||
if ($MyFile) {
|
if ($MyFile) {
|
||||||
$LocalVarFormParameters['my-file'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($MyFile)
|
$LocalVarFormParameters['my-file'] = $MyFile | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
|
||||||
}
|
}
|
||||||
|
|
||||||
$LocalVarResult = Invoke-ApiClient -Method 'POST' `
|
$LocalVarResult = Invoke-ApiClient -Method 'POST' `
|
||||||
|
@ -909,7 +909,7 @@ function Test-PSEndpointParameters {
|
|||||||
$LocalVarFormParameters['byte'] = $Byte
|
$LocalVarFormParameters['byte'] = $Byte
|
||||||
|
|
||||||
if ($Binary) {
|
if ($Binary) {
|
||||||
$LocalVarFormParameters['binary'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($Binary)
|
$LocalVarFormParameters['binary'] = $Binary | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($Date) {
|
if ($Date) {
|
||||||
|
@ -679,7 +679,7 @@ function Invoke-PSUploadFile {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($File) {
|
if ($File) {
|
||||||
$LocalVarFormParameters['file'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($File)
|
$LocalVarFormParameters['file'] = $File | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -778,7 +778,7 @@ function Invoke-PSUploadFileWithRequiredFile {
|
|||||||
if (!$RequiredFile) {
|
if (!$RequiredFile) {
|
||||||
throw "Error! The required parameter `RequiredFile` missing when calling uploadFileWithRequiredFile."
|
throw "Error! The required parameter `RequiredFile` missing when calling uploadFileWithRequiredFile."
|
||||||
}
|
}
|
||||||
$LocalVarFormParameters['requiredFile'] = $executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($RequiredFile)
|
$LocalVarFormParameters['requiredFile'] = $RequiredFile | Foreach-Object { [System.IO.FileInfo]$executionContext.SessionState.Path.GetUnresolvedProviderPathFromPSPath($_) }
|
||||||
|
|
||||||
|
|
||||||
$LocalVarResult = Invoke-PSApiClient -Method 'POST' `
|
$LocalVarResult = Invoke-PSApiClient -Method 'POST' `
|
||||||
|
Loading…
x
Reference in New Issue
Block a user