[python] Add tests and fix enum path parameters (#16769)

* test: Tests for enum params in path, query and header

* fix: Get enum ref values correctly in path parameters

Closes #16688

* fix java tests failure

---------

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Robert Schweizer
2023-10-10 11:10:30 +02:00
committed by GitHub
parent 7bb75f4bb4
commit 9e07f85eb5
88 changed files with 1549 additions and 538 deletions

View File

@@ -74,7 +74,7 @@ class HeaderApi
/** @var string[] $contentTypes **/
public const contentTypes = [
'testHeaderIntegerBooleanString' => [
'testHeaderIntegerBooleanStringEnums' => [
'application/json',
],
];
@@ -126,52 +126,60 @@ class HeaderApi
}
/**
* Operation testHeaderIntegerBooleanString
* Operation testHeaderIntegerBooleanStringEnums
*
* Test header parameter(s)
*
* @param int|null $integer_header integer_header (optional)
* @param bool|null $boolean_header boolean_header (optional)
* @param string|null $string_header string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation
* @param string|null $enum_nonref_string_header enum_nonref_string_header (optional)
* @param StringEnumRef|null $enum_ref_string_header enum_ref_string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanStringEnums'] to see the possible values for this operation
*
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException
* @return string
*/
public function testHeaderIntegerBooleanString(
public function testHeaderIntegerBooleanStringEnums(
?int $integer_header = null,
?bool $boolean_header = null,
?string $string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]
?string $enum_nonref_string_header = null,
?StringEnumRef $enum_ref_string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanStringEnums'][0]
): string
{
list($response) = $this->testHeaderIntegerBooleanStringWithHttpInfo($integer_header, $boolean_header, $string_header, $contentType);
list($response) = $this->testHeaderIntegerBooleanStringEnumsWithHttpInfo($integer_header, $boolean_header, $string_header, $enum_nonref_string_header, $enum_ref_string_header, $contentType);
return $response;
}
/**
* Operation testHeaderIntegerBooleanStringWithHttpInfo
* Operation testHeaderIntegerBooleanStringEnumsWithHttpInfo
*
* Test header parameter(s)
*
* @param int|null $integer_header (optional)
* @param bool|null $boolean_header (optional)
* @param string|null $string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation
* @param string|null $enum_nonref_string_header (optional)
* @param StringEnumRef|null $enum_ref_string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanStringEnums'] to see the possible values for this operation
*
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException
* @return array of string, HTTP status code, HTTP response headers (array of strings)
*/
public function testHeaderIntegerBooleanStringWithHttpInfo(
public function testHeaderIntegerBooleanStringEnumsWithHttpInfo(
?int $integer_header = null,
?bool $boolean_header = null,
?string $string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]
?string $enum_nonref_string_header = null,
?StringEnumRef $enum_ref_string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanStringEnums'][0]
): array
{
$request = $this->testHeaderIntegerBooleanStringRequest($integer_header, $boolean_header, $string_header, $contentType);
$request = $this->testHeaderIntegerBooleanStringEnumsRequest($integer_header, $boolean_header, $string_header, $enum_nonref_string_header, $enum_ref_string_header, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -258,26 +266,30 @@ class HeaderApi
}
/**
* Operation testHeaderIntegerBooleanStringAsync
* Operation testHeaderIntegerBooleanStringEnumsAsync
*
* Test header parameter(s)
*
* @param int|null $integer_header (optional)
* @param bool|null $boolean_header (optional)
* @param string|null $string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation
* @param string|null $enum_nonref_string_header (optional)
* @param StringEnumRef|null $enum_ref_string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanStringEnums'] to see the possible values for this operation
*
* @throws InvalidArgumentException
* @return PromiseInterface
*/
public function testHeaderIntegerBooleanStringAsync(
public function testHeaderIntegerBooleanStringEnumsAsync(
?int $integer_header = null,
?bool $boolean_header = null,
?string $string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]
?string $enum_nonref_string_header = null,
?StringEnumRef $enum_ref_string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanStringEnums'][0]
): PromiseInterface
{
return $this->testHeaderIntegerBooleanStringAsyncWithHttpInfo($integer_header, $boolean_header, $string_header, $contentType)
return $this->testHeaderIntegerBooleanStringEnumsAsyncWithHttpInfo($integer_header, $boolean_header, $string_header, $enum_nonref_string_header, $enum_ref_string_header, $contentType)
->then(
function ($response) {
return $response[0];
@@ -286,27 +298,31 @@ class HeaderApi
}
/**
* Operation testHeaderIntegerBooleanStringAsyncWithHttpInfo
* Operation testHeaderIntegerBooleanStringEnumsAsyncWithHttpInfo
*
* Test header parameter(s)
*
* @param int|null $integer_header (optional)
* @param bool|null $boolean_header (optional)
* @param string|null $string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation
* @param string|null $enum_nonref_string_header (optional)
* @param StringEnumRef|null $enum_ref_string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanStringEnums'] to see the possible values for this operation
*
* @throws InvalidArgumentException
* @return PromiseInterface
*/
public function testHeaderIntegerBooleanStringAsyncWithHttpInfo(
public function testHeaderIntegerBooleanStringEnumsAsyncWithHttpInfo(
$integer_header = null,
$boolean_header = null,
$string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]
$enum_nonref_string_header = null,
$enum_ref_string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanStringEnums'][0]
): PromiseInterface
{
$returnType = 'string';
$request = $this->testHeaderIntegerBooleanStringRequest($integer_header, $boolean_header, $string_header, $contentType);
$request = $this->testHeaderIntegerBooleanStringEnumsRequest($integer_header, $boolean_header, $string_header, $enum_nonref_string_header, $enum_ref_string_header, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -345,21 +361,25 @@ class HeaderApi
}
/**
* Create request for operation 'testHeaderIntegerBooleanString'
* Create request for operation 'testHeaderIntegerBooleanStringEnums'
*
* @param int|null $integer_header (optional)
* @param bool|null $boolean_header (optional)
* @param string|null $string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanString'] to see the possible values for this operation
* @param string|null $enum_nonref_string_header (optional)
* @param StringEnumRef|null $enum_ref_string_header (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testHeaderIntegerBooleanStringEnums'] to see the possible values for this operation
*
* @throws InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function testHeaderIntegerBooleanStringRequest(
public function testHeaderIntegerBooleanStringEnumsRequest(
$integer_header = null,
$boolean_header = null,
$string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanString'][0]
$enum_nonref_string_header = null,
$enum_ref_string_header = null,
string $contentType = self::contentTypes['testHeaderIntegerBooleanStringEnums'][0]
): Request
{
@@ -367,7 +387,9 @@ class HeaderApi
$resourcePath = '/header/integer/boolean/string';
$resourcePath = '/header/integer/boolean/string/enums';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -387,6 +409,14 @@ class HeaderApi
if ($string_header !== null) {
$headerParams['string_header'] = ObjectSerializer::toHeaderValue($string_header);
}
// header params
if ($enum_nonref_string_header !== null) {
$headerParams['enum_nonref_string_header'] = ObjectSerializer::toHeaderValue($enum_nonref_string_header);
}
// header params
if ($enum_ref_string_header !== null) {
$headerParams['enum_ref_string_header'] = ObjectSerializer::toHeaderValue($enum_ref_string_header);
}

View File

@@ -74,7 +74,7 @@ class PathApi
/** @var string[] $contentTypes **/
public const contentTypes = [
'testsPathStringPathStringIntegerPathInteger' => [
'testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath' => [
'application/json',
],
];
@@ -126,48 +126,56 @@ class PathApi
}
/**
* Operation testsPathStringPathStringIntegerPathInteger
* Operation testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath
*
* Test path parameter(s)
*
* @param string $path_string path_string (required)
* @param int $path_integer path_integer (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation
* @param string $enum_nonref_string_path enum_nonref_string_path (required)
* @param StringEnumRef $enum_ref_string_path enum_ref_string_path (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'] to see the possible values for this operation
*
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException
* @return string
*/
public function testsPathStringPathStringIntegerPathInteger(
public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath(
string $path_string,
int $path_integer,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]
string $enum_nonref_string_path,
StringEnumRef $enum_ref_string_path,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'][0]
): string
{
list($response) = $this->testsPathStringPathStringIntegerPathIntegerWithHttpInfo($path_string, $path_integer, $contentType);
list($response) = $this->testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo($path_string, $path_integer, $enum_nonref_string_path, $enum_ref_string_path, $contentType);
return $response;
}
/**
* Operation testsPathStringPathStringIntegerPathIntegerWithHttpInfo
* Operation testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo
*
* Test path parameter(s)
*
* @param string $path_string (required)
* @param int $path_integer (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation
* @param string $enum_nonref_string_path (required)
* @param StringEnumRef $enum_ref_string_path (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'] to see the possible values for this operation
*
* @throws ApiException on non-2xx response
* @throws InvalidArgumentException
* @return array of string, HTTP status code, HTTP response headers (array of strings)
*/
public function testsPathStringPathStringIntegerPathIntegerWithHttpInfo(
public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(
string $path_string,
int $path_integer,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]
string $enum_nonref_string_path,
StringEnumRef $enum_ref_string_path,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'][0]
): array
{
$request = $this->testsPathStringPathStringIntegerPathIntegerRequest($path_string, $path_integer, $contentType);
$request = $this->testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequest($path_string, $path_integer, $enum_nonref_string_path, $enum_ref_string_path, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -254,24 +262,28 @@ class PathApi
}
/**
* Operation testsPathStringPathStringIntegerPathIntegerAsync
* Operation testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathAsync
*
* Test path parameter(s)
*
* @param string $path_string (required)
* @param int $path_integer (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation
* @param string $enum_nonref_string_path (required)
* @param StringEnumRef $enum_ref_string_path (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'] to see the possible values for this operation
*
* @throws InvalidArgumentException
* @return PromiseInterface
*/
public function testsPathStringPathStringIntegerPathIntegerAsync(
public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathAsync(
string $path_string,
int $path_integer,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]
string $enum_nonref_string_path,
StringEnumRef $enum_ref_string_path,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'][0]
): PromiseInterface
{
return $this->testsPathStringPathStringIntegerPathIntegerAsyncWithHttpInfo($path_string, $path_integer, $contentType)
return $this->testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathAsyncWithHttpInfo($path_string, $path_integer, $enum_nonref_string_path, $enum_ref_string_path, $contentType)
->then(
function ($response) {
return $response[0];
@@ -280,25 +292,29 @@ class PathApi
}
/**
* Operation testsPathStringPathStringIntegerPathIntegerAsyncWithHttpInfo
* Operation testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathAsyncWithHttpInfo
*
* Test path parameter(s)
*
* @param string $path_string (required)
* @param int $path_integer (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation
* @param string $enum_nonref_string_path (required)
* @param StringEnumRef $enum_ref_string_path (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'] to see the possible values for this operation
*
* @throws InvalidArgumentException
* @return PromiseInterface
*/
public function testsPathStringPathStringIntegerPathIntegerAsyncWithHttpInfo(
public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathAsyncWithHttpInfo(
$path_string,
$path_integer,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]
$enum_nonref_string_path,
$enum_ref_string_path,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'][0]
): PromiseInterface
{
$returnType = 'string';
$request = $this->testsPathStringPathStringIntegerPathIntegerRequest($path_string, $path_integer, $contentType);
$request = $this->testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequest($path_string, $path_integer, $enum_nonref_string_path, $enum_ref_string_path, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -337,38 +353,56 @@ class PathApi
}
/**
* Create request for operation 'testsPathStringPathStringIntegerPathInteger'
* Create request for operation 'testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'
*
* @param string $path_string (required)
* @param int $path_integer (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathInteger'] to see the possible values for this operation
* @param string $enum_nonref_string_path (required)
* @param StringEnumRef $enum_ref_string_path (required)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'] to see the possible values for this operation
*
* @throws InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
public function testsPathStringPathStringIntegerPathIntegerRequest(
public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathRequest(
$path_string,
$path_integer,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathInteger'][0]
$enum_nonref_string_path,
$enum_ref_string_path,
string $contentType = self::contentTypes['testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'][0]
): Request
{
// verify the required parameter 'path_string' is set
if ($path_string === null || (is_array($path_string) && count($path_string) === 0)) {
throw new InvalidArgumentException(
'Missing the required parameter $path_string when calling testsPathStringPathStringIntegerPathInteger'
'Missing the required parameter $path_string when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'
);
}
// verify the required parameter 'path_integer' is set
if ($path_integer === null || (is_array($path_integer) && count($path_integer) === 0)) {
throw new InvalidArgumentException(
'Missing the required parameter $path_integer when calling testsPathStringPathStringIntegerPathInteger'
'Missing the required parameter $path_integer when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'
);
}
// verify the required parameter 'enum_nonref_string_path' is set
if ($enum_nonref_string_path === null || (is_array($enum_nonref_string_path) && count($enum_nonref_string_path) === 0)) {
throw new InvalidArgumentException(
'Missing the required parameter $enum_nonref_string_path when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'
);
}
// verify the required parameter 'enum_ref_string_path' is set
if ($enum_ref_string_path === null || (is_array($enum_ref_string_path) && count($enum_ref_string_path) === 0)) {
throw new InvalidArgumentException(
'Missing the required parameter $enum_ref_string_path when calling testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath'
);
}
$resourcePath = '/path/string/{path_string}/integer/{path_integer}';
$resourcePath = '/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}';
$formParams = [];
$queryParams = [];
$headerParams = [];
@@ -393,6 +427,22 @@ class PathApi
$resourcePath
);
}
// path params
if ($enum_nonref_string_path !== null) {
$resourcePath = str_replace(
'{' . 'enum_nonref_string_path' . '}',
ObjectSerializer::toPathValue($enum_nonref_string_path),
$resourcePath
);
}
// path params
if ($enum_ref_string_path !== null) {
$resourcePath = str_replace(
'{' . 'enum_ref_string_path' . '}',
ObjectSerializer::toPathValue($enum_ref_string_path),
$resourcePath
);
}
$headers = $this->headerSelector->selectHeaders(

View File

@@ -151,6 +151,7 @@ class QueryApi
*
* Test query parameter(s)
*
* @param string|null $enum_nonref_string_query enum_nonref_string_query (optional)
* @param StringEnumRef|null $enum_ref_string_query enum_ref_string_query (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation
*
@@ -159,11 +160,12 @@ class QueryApi
* @return string
*/
public function testEnumRefString(
?string $enum_nonref_string_query = null,
?StringEnumRef $enum_ref_string_query = null,
string $contentType = self::contentTypes['testEnumRefString'][0]
): string
{
list($response) = $this->testEnumRefStringWithHttpInfo($enum_ref_string_query, $contentType);
list($response) = $this->testEnumRefStringWithHttpInfo($enum_nonref_string_query, $enum_ref_string_query, $contentType);
return $response;
}
@@ -172,6 +174,7 @@ class QueryApi
*
* Test query parameter(s)
*
* @param string|null $enum_nonref_string_query (optional)
* @param StringEnumRef|null $enum_ref_string_query (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation
*
@@ -180,11 +183,12 @@ class QueryApi
* @return array of string, HTTP status code, HTTP response headers (array of strings)
*/
public function testEnumRefStringWithHttpInfo(
?string $enum_nonref_string_query = null,
?StringEnumRef $enum_ref_string_query = null,
string $contentType = self::contentTypes['testEnumRefString'][0]
): array
{
$request = $this->testEnumRefStringRequest($enum_ref_string_query, $contentType);
$request = $this->testEnumRefStringRequest($enum_nonref_string_query, $enum_ref_string_query, $contentType);
try {
$options = $this->createHttpClientOption();
@@ -275,6 +279,7 @@ class QueryApi
*
* Test query parameter(s)
*
* @param string|null $enum_nonref_string_query (optional)
* @param StringEnumRef|null $enum_ref_string_query (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation
*
@@ -282,11 +287,12 @@ class QueryApi
* @return PromiseInterface
*/
public function testEnumRefStringAsync(
?string $enum_nonref_string_query = null,
?StringEnumRef $enum_ref_string_query = null,
string $contentType = self::contentTypes['testEnumRefString'][0]
): PromiseInterface
{
return $this->testEnumRefStringAsyncWithHttpInfo($enum_ref_string_query, $contentType)
return $this->testEnumRefStringAsyncWithHttpInfo($enum_nonref_string_query, $enum_ref_string_query, $contentType)
->then(
function ($response) {
return $response[0];
@@ -299,6 +305,7 @@ class QueryApi
*
* Test query parameter(s)
*
* @param string|null $enum_nonref_string_query (optional)
* @param StringEnumRef|null $enum_ref_string_query (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation
*
@@ -306,12 +313,13 @@ class QueryApi
* @return PromiseInterface
*/
public function testEnumRefStringAsyncWithHttpInfo(
$enum_nonref_string_query = null,
$enum_ref_string_query = null,
string $contentType = self::contentTypes['testEnumRefString'][0]
): PromiseInterface
{
$returnType = 'string';
$request = $this->testEnumRefStringRequest($enum_ref_string_query, $contentType);
$request = $this->testEnumRefStringRequest($enum_nonref_string_query, $enum_ref_string_query, $contentType);
return $this->client
->sendAsync($request, $this->createHttpClientOption())
@@ -352,6 +360,7 @@ class QueryApi
/**
* Create request for operation 'testEnumRefString'
*
* @param string|null $enum_nonref_string_query (optional)
* @param StringEnumRef|null $enum_ref_string_query (optional)
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['testEnumRefString'] to see the possible values for this operation
*
@@ -359,6 +368,7 @@ class QueryApi
* @return \GuzzleHttp\Psr7\Request
*/
public function testEnumRefStringRequest(
$enum_nonref_string_query = null,
$enum_ref_string_query = null,
string $contentType = self::contentTypes['testEnumRefString'][0]
): Request
@@ -366,6 +376,7 @@ class QueryApi
$resourcePath = '/query/enum_ref_string';
$formParams = [];
$queryParams = [];
@@ -373,6 +384,15 @@ class QueryApi
$httpBody = '';
$multipart = false;
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$enum_nonref_string_query,
'enum_nonref_string_query', // param base name
'string', // openApiType
'form', // style
true, // explode
false // required
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$enum_ref_string_query,