[Python] Add echo_api test object serialization for multipart requests (#18176)

* [python] echo add test object serialization for multipart requests

* [echo api] update samples

* [echo api] update samples
This commit is contained in:
ふぁ
2024-03-23 22:40:10 +09:00
committed by GitHub
parent 420e49f258
commit 5e9546451c
137 changed files with 7427 additions and 0 deletions

View File

@@ -0,0 +1,98 @@
#
# Echo Server API
# Echo Server API
# Version: 0.1.0
# Contact: team@openapitools.org
# Generated by OpenAPI Generator: https://openapi-generator.tech
#
<#
.SYNOPSIS
No summary available.
.DESCRIPTION
No description available.
.PARAMETER Name
No description available.
.OUTPUTS
TestFormObjectMultipartRequestMarker<PSCustomObject>
#>
function Initialize-TestFormObjectMultipartRequestMarker {
[CmdletBinding()]
Param (
[Parameter(Position = 0, ValueFromPipelineByPropertyName = $true)]
[String]
${Name}
)
Process {
'Creating PSCustomObject: PSOpenAPITools => TestFormObjectMultipartRequestMarker' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$PSO = [PSCustomObject]@{
"name" = ${Name}
}
return $PSO
}
}
<#
.SYNOPSIS
Convert from JSON to TestFormObjectMultipartRequestMarker<PSCustomObject>
.DESCRIPTION
Convert from JSON to TestFormObjectMultipartRequestMarker<PSCustomObject>
.PARAMETER Json
Json object
.OUTPUTS
TestFormObjectMultipartRequestMarker<PSCustomObject>
#>
function ConvertFrom-JsonToTestFormObjectMultipartRequestMarker {
Param(
[AllowEmptyString()]
[string]$Json
)
Process {
'Converting JSON to PSCustomObject: PSOpenAPITools => TestFormObjectMultipartRequestMarker' | Write-Debug
$PSBoundParameters | Out-DebugParameter | Write-Debug
$JsonParameters = ConvertFrom-Json -InputObject $Json
# check if Json contains properties not defined in TestFormObjectMultipartRequestMarker
$AllProperties = ("name")
foreach ($name in $JsonParameters.PsObject.Properties.Name) {
if (!($AllProperties.Contains($name))) {
throw "Error! JSON key '$name' not found in the properties: $($AllProperties)"
}
}
if (!([bool]($JsonParameters.PSobject.Properties.name -match "name"))) { #optional property not found
$Name = $null
} else {
$Name = $JsonParameters.PSobject.Properties["name"].value
}
$PSO = [PSCustomObject]@{
"name" = ${Name}
}
return $PSO
}
}