mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 02:47:11 +00:00
* updating test to use the Java RESTEasy echo api client (#17367) * regenerated samples * set source and target to 1.8 to fix workflow failure, adapted parser
This commit is contained in:
@@ -223,6 +223,82 @@ function Test-BodyMultipartFormdataArrayOfBinary {
|
||||
<#
|
||||
.SYNOPSIS
|
||||
|
||||
Test single binary in multipart mime
|
||||
|
||||
.DESCRIPTION
|
||||
|
||||
No description available.
|
||||
|
||||
.PARAMETER MyFile
|
||||
No description available.
|
||||
|
||||
.PARAMETER WithHttpInfo
|
||||
|
||||
A switch when turned on will return a hash table of Response, StatusCode and Headers instead of just the Response
|
||||
|
||||
.OUTPUTS
|
||||
|
||||
String
|
||||
#>
|
||||
function Test-BodyMultipartFormdataSingleBinary {
|
||||
[CmdletBinding()]
|
||||
Param (
|
||||
[Parameter(Position = 0, ValueFromPipeline = $true, ValueFromPipelineByPropertyName = $true, Mandatory = $false)]
|
||||
[System.IO.FileInfo]
|
||||
${MyFile},
|
||||
[Switch]
|
||||
$WithHttpInfo
|
||||
)
|
||||
|
||||
Process {
|
||||
'Calling method: Test-BodyMultipartFormdataSingleBinary' | Write-Debug
|
||||
$PSBoundParameters | Out-DebugParameter | Write-Debug
|
||||
|
||||
$LocalVarAccepts = @()
|
||||
$LocalVarContentTypes = @()
|
||||
$LocalVarQueryParameters = @{}
|
||||
$LocalVarHeaderParameters = @{}
|
||||
$LocalVarFormParameters = @{}
|
||||
$LocalVarPathParameters = @{}
|
||||
$LocalVarCookieParameters = @{}
|
||||
$LocalVarBodyParameter = $null
|
||||
|
||||
$Configuration = Get-Configuration
|
||||
# HTTP header 'Accept' (if needed)
|
||||
$LocalVarAccepts = @('text/plain')
|
||||
|
||||
# HTTP header 'Content-Type'
|
||||
$LocalVarContentTypes = @('multipart/form-data')
|
||||
|
||||
$LocalVarUri = '/body/application/octetstream/single_binary'
|
||||
|
||||
if ($MyFile) {
|
||||
$LocalVarFormParameters['my-file'] = $MyFile
|
||||
}
|
||||
|
||||
$LocalVarResult = Invoke-ApiClient -Method 'POST' `
|
||||
-Uri $LocalVarUri `
|
||||
-Accepts $LocalVarAccepts `
|
||||
-ContentTypes $LocalVarContentTypes `
|
||||
-Body $LocalVarBodyParameter `
|
||||
-HeaderParameters $LocalVarHeaderParameters `
|
||||
-QueryParameters $LocalVarQueryParameters `
|
||||
-FormParameters $LocalVarFormParameters `
|
||||
-CookieParameters $LocalVarCookieParameters `
|
||||
-ReturnType "String" `
|
||||
-IsBodyNullable $false
|
||||
|
||||
if ($WithHttpInfo.IsPresent) {
|
||||
return $LocalVarResult
|
||||
} else {
|
||||
return $LocalVarResult["Response"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
<#
|
||||
.SYNOPSIS
|
||||
|
||||
Test free form object
|
||||
|
||||
.DESCRIPTION
|
||||
|
||||
Reference in New Issue
Block a user