[PHP][php-nextgen] Fix usage of enums in parameters (#20294)

This commit is contained in:
Julian Vennen
2024-12-16 12:19:24 +01:00
committed by GitHub
parent 47891245e9
commit e87c4ea6c0
8 changed files with 10 additions and 10 deletions

View File

@@ -438,7 +438,7 @@ class HeaderApi
}
// header params
if ($enum_ref_string_header !== null) {
$headerParams['enum_ref_string_header'] = ObjectSerializer::toHeaderValue($enum_ref_string_header);
$headerParams['enum_ref_string_header'] = ObjectSerializer::toHeaderValue($enum_ref_string_header->value);
}

View File

@@ -462,7 +462,7 @@ class PathApi
if ($enum_ref_string_path !== null) {
$resourcePath = str_replace(
'{' . 'enum_ref_string_path' . '}',
ObjectSerializer::toPathValue($enum_ref_string_path),
ObjectSerializer::toPathValue($enum_ref_string_path->value),
$resourcePath
);
}

View File

@@ -424,7 +424,7 @@ class QueryApi
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$enum_ref_string_query,
$enum_ref_string_query->value,
'enum_ref_string_query', // param base name
'StringEnumRef', // openApiType
'form', // style

View File

@@ -438,7 +438,7 @@ class HeaderApi
}
// header params
if ($enum_ref_string_header !== null) {
$headerParams['enum_ref_string_header'] = ObjectSerializer::toHeaderValue($enum_ref_string_header);
$headerParams['enum_ref_string_header'] = ObjectSerializer::toHeaderValue($enum_ref_string_header->value);
}

View File

@@ -462,7 +462,7 @@ class PathApi
if ($enum_ref_string_path !== null) {
$resourcePath = str_replace(
'{' . 'enum_ref_string_path' . '}',
ObjectSerializer::toPathValue($enum_ref_string_path),
ObjectSerializer::toPathValue($enum_ref_string_path->value),
$resourcePath
);
}

View File

@@ -424,7 +424,7 @@ class QueryApi
) ?? []);
// query params
$queryParams = array_merge($queryParams, ObjectSerializer::toQueryValue(
$enum_ref_string_query,
$enum_ref_string_query->value,
'enum_ref_string_query', // param base name
'StringEnumRef', // openApiType
'form', // style