From d8f0db87c9edc537d1e51fb91167b70099751cca Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:01:10 +0200 Subject: [PATCH 01/11] [php-nextgen] Remove request body handling if there is none --- .../src/main/resources/php-nextgen/api.mustache | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache index a16f59353e01..44e9237a1774 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -747,6 +747,7 @@ use {{invokerPackage}}\ObjectSerializer; $multipart ); + {{#hasBodyOrFormParams}} // for model (json/xml) {{#bodyParams}} if (isset(${{paramName}})) { @@ -783,6 +784,7 @@ use {{invokerPackage}}\ObjectSerializer; $httpBody = ObjectSerializer::buildQuery($formParams); } } + {{/hasBodyOrFormParams}} {{#authMethods}} {{#isApiKey}} From c43054e36765685612789eaeffaffdb39e1d7ae8 Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:01:41 +0200 Subject: [PATCH 02/11] [php-nextgen]: Regenerate to remove request body handling --- .../php-nextgen-streaming/src/Api/AuthApi.php | 48 ---- .../php-nextgen-streaming/src/Api/BodyApi.php | 24 -- .../src/Api/HeaderApi.php | 24 -- .../php-nextgen-streaming/src/Api/PathApi.php | 24 -- .../src/Api/QueryApi.php | 264 ------------------ .../echo_api/php-nextgen/src/Api/AuthApi.php | 48 ---- .../echo_api/php-nextgen/src/Api/BodyApi.php | 24 -- .../php-nextgen/src/Api/HeaderApi.php | 24 -- .../echo_api/php-nextgen/src/Api/PathApi.php | 24 -- .../echo_api/php-nextgen/src/Api/QueryApi.php | 264 ------------------ .../OpenAPIClient-php/src/Api/DefaultApi.php | 48 ---- .../OpenAPIClient-php/src/Api/FakeApi.php | 144 ---------- .../OpenAPIClient-php/src/Api/PetApi.php | 96 ------- .../OpenAPIClient-php/src/Api/StoreApi.php | 72 ----- .../OpenAPIClient-php/src/Api/UserApi.php | 96 ------- 15 files changed, 1224 deletions(-) diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php index 07ad20252f69..659f8b2d97c6 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php @@ -337,30 +337,6 @@ public function testAuthHttpBasicRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -596,30 +572,6 @@ public function testAuthHttpBearerRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires Bearer authentication (access token) if (!empty($this->config->getAccessToken())) { diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php index 938054ae2bae..48e79d3dfef0 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php @@ -361,30 +361,6 @@ public function testBinaryGifRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php index 91c02521145f..119bfbc742dc 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php @@ -409,30 +409,6 @@ public function testHeaderIntegerBooleanStringEnumsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php index ab484c88b076..bf898ffe873d 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php @@ -434,30 +434,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php index edb574695642..ccfde2f90edb 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php @@ -404,30 +404,6 @@ public function testEnumRefStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -718,30 +694,6 @@ public function testQueryDatetimeDateStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1032,30 +984,6 @@ public function testQueryIntegerBooleanStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1306,30 +1234,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1580,30 +1484,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1854,30 +1734,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2128,30 +1984,6 @@ public function testQueryStyleFormExplodeFalseArrayStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2402,30 +2234,6 @@ public function testQueryStyleFormExplodeTrueArrayStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2676,30 +2484,6 @@ public function testQueryStyleFormExplodeTrueObjectRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2950,30 +2734,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3244,30 +3004,6 @@ public function testQueryStyleJsonSerializationObjectRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index 07ad20252f69..659f8b2d97c6 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -337,30 +337,6 @@ public function testAuthHttpBasicRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires HTTP basic authentication if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { @@ -596,30 +572,6 @@ public function testAuthHttpBearerRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires Bearer authentication (access token) if (!empty($this->config->getAccessToken())) { diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php index 921eb5ee17c8..336772bf26c5 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -361,30 +361,6 @@ public function testBinaryGifRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php index 91c02521145f..119bfbc742dc 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -409,30 +409,6 @@ public function testHeaderIntegerBooleanStringEnumsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php index ab484c88b076..bf898ffe873d 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -434,30 +434,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php index edb574695642..ccfde2f90edb 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -404,30 +404,6 @@ public function testEnumRefStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -718,30 +694,6 @@ public function testQueryDatetimeDateStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1032,30 +984,6 @@ public function testQueryIntegerBooleanStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1306,30 +1234,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1580,30 +1484,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1854,30 +1734,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2128,30 +1984,6 @@ public function testQueryStyleFormExplodeFalseArrayStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2402,30 +2234,6 @@ public function testQueryStyleFormExplodeTrueArrayStringRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2676,30 +2484,6 @@ public function testQueryStyleFormExplodeTrueObjectRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -2950,30 +2734,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -3244,30 +3004,6 @@ public function testQueryStyleJsonSerializationObjectRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php index a843ce12b1a5..06610f97103a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php @@ -321,30 +321,6 @@ public function errorRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -567,30 +543,6 @@ public function fooGetRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index ea9cf90967db..259742bf3239 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -415,30 +415,6 @@ public function fakeBigDecimalMapRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -671,30 +647,6 @@ public function fakeDeletePetRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1003,30 +955,6 @@ public function fakeEnumEndpointRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1257,30 +1185,6 @@ public function fakeHealthGetRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -6645,30 +6549,6 @@ public function testGroupParametersRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires Bearer (JWT) authentication (access token) if (!empty($this->config->getAccessToken())) { @@ -7964,30 +7844,6 @@ public function testQueryParameterCollectionFormatRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php index cfd6a07f61ff..34c04b1ed8ec 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php @@ -747,30 +747,6 @@ public function deletePetRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { @@ -1032,30 +1008,6 @@ public function findPetsByStatusRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { @@ -1322,30 +1274,6 @@ public function findPetsByTagsRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires OAuth (access token) if (!empty($this->config->getAccessToken())) { @@ -1606,30 +1534,6 @@ public function getPetByIdRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('api_key'); diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php index f32d47ff6765..ff4a9724148a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php @@ -319,30 +319,6 @@ public function deleteOrderRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -573,30 +549,6 @@ public function getInventoryRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('api_key'); @@ -864,30 +816,6 @@ public function getOrderByIdRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php index fb7f5c9bc6da..c9a0a873c430 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php @@ -1021,30 +1021,6 @@ public function deleteUserRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1300,30 +1276,6 @@ public function getUserByNameRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1606,30 +1558,6 @@ public function loginUserRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { @@ -1812,30 +1740,6 @@ public function logoutUserRequest( $multipart ); - // for model (json/xml) - if (count($formParams) > 0) { - if ($multipart) { - $multipartContents = []; - foreach ($formParams as $formParamName => $formParamValue) { - $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue]; - foreach ($formParamValueItems as $formParamValueItem) { - $multipartContents[] = [ - 'name' => $formParamName, - 'contents' => $formParamValueItem - ]; - } - } - // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); - - } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { - # if Content-Type contains "application/json", json_encode the form parameters - $httpBody = \GuzzleHttp\Utils::jsonEncode($formParams); - } else { - // for HTTP post (form) - $httpBody = ObjectSerializer::buildQuery($formParams); - } - } $defaultHeaders = []; if ($this->config->getUserAgent()) { From b80fdb7666b5f9616a9914d19a4010533454df70 Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:01:57 +0200 Subject: [PATCH 03/11] [php-nextgen] Add test for request body handling --- .../php/PhpNextgenClientCodegenTest.java | 59 +++++++++++++++++++ .../3_0/php-nextgen/form-body-params.yaml | 52 ++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 modules/openapi-generator/src/test/resources/3_0/php-nextgen/form-body-params.yaml diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpNextgenClientCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpNextgenClientCodegenTest.java index 88ad980ac167..17c85a2ab68b 100644 --- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpNextgenClientCodegenTest.java +++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/php/PhpNextgenClientCodegenTest.java @@ -215,4 +215,63 @@ public void testDifferentResponseSchemasWithEmpty() throws IOException { Assert.assertListContains(modelContent, a -> a.equals("): int|string|null"), "Expected to find nullable return type declaration."); Assert.assertListNotContains(modelContent, a -> a.equals("): ?int|string"), "Expected to not find invalid union type with '?'."); } + + @Test + public void testFormParamsBlockOnlyEmittedWhenBodyOrFormParamsExist() throws IOException { + File output = Files.createTempDirectory("test").toFile().getCanonicalFile(); + output.deleteOnExit(); + + OpenAPI openAPI = new OpenAPIParser() + .readLocation("src/test/resources/3_0/php-nextgen/form-body-params.yaml", null, new ParseOptions()) + .getOpenAPI(); + + codegen.setOutputDir(output.getAbsolutePath()); + ClientOptInput input = new ClientOptInput() + .openAPI(openAPI) + .config(codegen); + + DefaultGenerator generator = new DefaultGenerator(); + Map files = generator.opts(input).generate().stream() + .collect(Collectors.toMap(File::getName, Function.identity())); + + String apiContent = Files.readString(files.get("DefaultApi.php").toPath()); + + // Each operation produces a "*Request" helper holding its own httpBody handling. + String noBodyNoForm = extractMethod(apiContent, "noBodyNoFormRequest"); + String bodyParam = extractMethod(apiContent, "bodyParamRequest"); + String formParam = extractMethod(apiContent, "formParamRequest"); + + // No body, no form: the dead form-params block must not be generated at all. + Assert.assertFalse(noBodyNoForm.contains("if (count($formParams) > 0)"), + "Operation without body or form params must not emit the form-params block"); + Assert.assertFalse(noBodyNoForm.contains("// for model (json/xml)"), + "Operation without body or form params must not emit the json/xml comment"); + + // Body param: emits the body block followed by the elseif form-params branch. + Assert.assertTrue(bodyParam.contains("if (isset($thing)) {"), + "Body param operation must emit the body serialization block"); + Assert.assertTrue(bodyParam.contains("} elseif (count($formParams) > 0) {"), + "Body param operation must keep the elseif form-params branch"); + + // Form param: emits the standalone form-params block. + Assert.assertTrue(formParam.contains("if (count($formParams) > 0) {"), + "Form param operation must emit the standalone form-params block"); + Assert.assertFalse(formParam.contains("} elseif (count($formParams) > 0) {"), + "Form-only operation must not have an elseif (no body branch precedes it)"); + } + + /** + * Extracts the source of a single PHP method (from its declaration up to, but not + * including, the next method declaration) so per-operation assertions don't leak + * across operations sharing the same generated file. + */ + private static String extractMethod(String content, String methodName) { + int start = content.indexOf("function " + methodName + "("); + Assert.assertTrue(start >= 0, "Expected to find method " + methodName + " in generated API"); + int next = content.indexOf("\n public function ", start + 1); + if (next < 0) { + next = content.indexOf("\n protected function ", start + 1); + } + return next < 0 ? content.substring(start) : content.substring(start, next); + } } diff --git a/modules/openapi-generator/src/test/resources/3_0/php-nextgen/form-body-params.yaml b/modules/openapi-generator/src/test/resources/3_0/php-nextgen/form-body-params.yaml new file mode 100644 index 000000000000..209bc96e5cfd --- /dev/null +++ b/modules/openapi-generator/src/test/resources/3_0/php-nextgen/form-body-params.yaml @@ -0,0 +1,52 @@ +openapi: 3.0.0 +info: + title: Form and body params test + version: 1.0.0 +paths: + /no-body-no-form: + get: + operationId: noBodyNoForm + parameters: + - name: filter + in: query + schema: + type: string + responses: + '200': + description: OK + /body-param: + post: + operationId: bodyParam + requestBody: + content: + application/json: + schema: + $ref: '#/components/schemas/Thing' + responses: + '200': + description: OK + /form-param: + post: + operationId: formParam + requestBody: + content: + application/x-www-form-urlencoded: + schema: + type: object + properties: + name: + type: string + count: + type: integer + responses: + '200': + description: OK +components: + schemas: + Thing: + type: object + properties: + id: + type: integer + name: + type: string From c879e5eba5238375ab423badb3570e83048cca33 Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:22:19 +0200 Subject: [PATCH 04/11] [php-nextgen] Don't import formpreocessor --- .../src/main/resources/php-nextgen/api.mustache | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache index 44e9237a1774..cc918a9f85ff 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -32,7 +32,6 @@ use Psr\Http\Message\ResponseInterface; use {{invokerPackage}}\ApiException; use {{invokerPackage}}\Configuration; use {{invokerPackage}}\HeaderSelector; -use {{invokerPackage}}\FormDataProcessor; use {{invokerPackage}}\ObjectSerializer; /** @@ -728,7 +727,7 @@ use {{invokerPackage}}\ObjectSerializer; {{#formParams}} {{#-first}} // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \{{invokerPackage}}\FormDataProcessor(); $formData = $formDataProcessor->prepare([ {{/-first}} From ea8bf1d98664e00050fae1de5691d562f808177e Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 16:22:43 +0200 Subject: [PATCH 05/11] [php-nextgen] Regenerate code --- .../echo_api/php-nextgen-streaming/src/Api/AuthApi.php | 1 - .../echo_api/php-nextgen-streaming/src/Api/BodyApi.php | 5 ++--- .../echo_api/php-nextgen-streaming/src/Api/FormApi.php | 7 +++---- .../echo_api/php-nextgen-streaming/src/Api/HeaderApi.php | 1 - .../echo_api/php-nextgen-streaming/src/Api/PathApi.php | 1 - .../echo_api/php-nextgen-streaming/src/Api/QueryApi.php | 1 - samples/client/echo_api/php-nextgen/src/Api/AuthApi.php | 1 - samples/client/echo_api/php-nextgen/src/Api/BodyApi.php | 5 ++--- samples/client/echo_api/php-nextgen/src/Api/FormApi.php | 7 +++---- samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php | 1 - samples/client/echo_api/php-nextgen/src/Api/PathApi.php | 1 - samples/client/echo_api/php-nextgen/src/Api/QueryApi.php | 1 - .../OpenAPIClient-php/src/Api/AnotherFakeApi.php | 1 - .../php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php | 1 - .../php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php | 7 +++---- .../OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php | 1 - .../php-nextgen/OpenAPIClient-php/src/Api/PetApi.php | 7 +++---- .../php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php | 1 - .../php-nextgen/OpenAPIClient-php/src/Api/UserApi.php | 1 - 19 files changed, 16 insertions(+), 35 deletions(-) diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php index 659f8b2d97c6..5beff02de3ce 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php index 48e79d3dfef0..f2f825e0d3b2 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** @@ -874,7 +873,7 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'files' => $files, @@ -1148,7 +1147,7 @@ public function testBodyMultipartFormdataSingleBinaryRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'my-file' => $my_file, diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php index b2e8dca3cea1..89d7d982f555 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** @@ -367,7 +366,7 @@ public function testFormIntegerBooleanStringRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'integer_form' => $integer_form, @@ -649,7 +648,7 @@ public function testFormObjectMultipartRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'marker' => $marker, @@ -978,7 +977,7 @@ public function testFormOneofRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'form1' => $form1, diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php index 119bfbc742dc..69be9eb3cf9a 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php index bf898ffe873d..8f9d1dea498f 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php index ccfde2f90edb..e26cfe86c391 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index 659f8b2d97c6..5beff02de3ce 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php index 336772bf26c5..41bc2468aefe 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** @@ -874,7 +873,7 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'files' => $files, @@ -1148,7 +1147,7 @@ public function testBodyMultipartFormdataSingleBinaryRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'my-file' => $my_file, diff --git a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php index b2e8dca3cea1..89d7d982f555 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** @@ -367,7 +366,7 @@ public function testFormIntegerBooleanStringRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'integer_form' => $integer_form, @@ -649,7 +648,7 @@ public function testFormObjectMultipartRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'marker' => $marker, @@ -978,7 +977,7 @@ public function testFormOneofRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'form1' => $form1, diff --git a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php index 119bfbc742dc..69be9eb3cf9a 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php index bf898ffe873d..8f9d1dea498f 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php index ccfde2f90edb..e26cfe86c391 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -41,7 +41,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php index 670444efd6f3..e2d762bc599f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php @@ -40,7 +40,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php index 06610f97103a..32b76ab18826 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php @@ -40,7 +40,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index 259742bf3239..8b59e1da81f1 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -40,7 +40,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** @@ -5823,7 +5822,7 @@ public function testEndpointParametersRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'integer' => $integer, @@ -6211,7 +6210,7 @@ public function testEnumParametersRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'enum_form_string_array' => $enum_form_string_array, @@ -7224,7 +7223,7 @@ public function testJsonFormDataRequest( // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'param' => $param, diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php index 9953f5f3ef68..7b1a7aec8238 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php @@ -40,7 +40,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php index 34c04b1ed8ec..e8c56033b667 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php @@ -40,7 +40,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** @@ -2159,7 +2158,7 @@ public function updatePetWithFormRequest( } // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'name' => $name, @@ -2475,7 +2474,7 @@ public function uploadFileRequest( } // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'additionalMetadata' => $additional_metadata, @@ -2797,7 +2796,7 @@ public function uploadFileWithRequiredFileRequest( } // form params - $formDataProcessor = new FormDataProcessor(); + $formDataProcessor = new \OpenAPI\Client\FormDataProcessor(); $formData = $formDataProcessor->prepare([ 'additionalMetadata' => $additional_metadata, diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php index ff4a9724148a..19cc2cc7c202 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php @@ -40,7 +40,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php index c9a0a873c430..bd97c4b80b6f 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php @@ -40,7 +40,6 @@ use OpenAPI\Client\ApiException; use OpenAPI\Client\Configuration; use OpenAPI\Client\HeaderSelector; -use OpenAPI\Client\FormDataProcessor; use OpenAPI\Client\ObjectSerializer; /** From 185eb6d6b4754dc3753cabfba14b6c422ae12afc Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:05:14 +0200 Subject: [PATCH 06/11] [php-nextge]: Move MultipartStream to inline use --- .../src/main/resources/php-nextgen/api.mustache | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache index cc918a9f85ff..c3cceb385e6a 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -23,7 +23,6 @@ use GuzzleHttp\Client; use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -773,7 +772,7 @@ use {{invokerPackage}}\ObjectSerializer; } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters From 3f2be0105a6e47411a1a4f13d154397e6b803782 Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:05:29 +0200 Subject: [PATCH 07/11] [php-nextgen]: Regenerate for imports --- .../php-nextgen-streaming/src/Api/AuthApi.php | 1 - .../php-nextgen-streaming/src/Api/BodyApi.php | 19 ++++---- .../php-nextgen-streaming/src/Api/FormApi.php | 7 ++- .../src/Api/HeaderApi.php | 1 - .../php-nextgen-streaming/src/Api/PathApi.php | 1 - .../src/Api/QueryApi.php | 1 - .../echo_api/php-nextgen/src/Api/AuthApi.php | 1 - .../echo_api/php-nextgen/src/Api/BodyApi.php | 19 ++++---- .../echo_api/php-nextgen/src/Api/FormApi.php | 7 ++- .../php-nextgen/src/Api/HeaderApi.php | 1 - .../echo_api/php-nextgen/src/Api/PathApi.php | 1 - .../echo_api/php-nextgen/src/Api/QueryApi.php | 1 - .../src/Api/AnotherFakeApi.php | 3 +- .../OpenAPIClient-php/src/Api/DefaultApi.php | 1 - .../OpenAPIClient-php/src/Api/FakeApi.php | 47 +++++++++---------- .../src/Api/FakeClassnameTags123Api.php | 3 +- .../OpenAPIClient-php/src/Api/PetApi.php | 11 ++--- .../OpenAPIClient-php/src/Api/StoreApi.php | 3 +- .../OpenAPIClient-php/src/Api/UserApi.php | 9 ++-- 19 files changed, 59 insertions(+), 78 deletions(-) diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php index 5beff02de3ce..b0d0973f6902 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php index f2f825e0d3b2..87835783282e 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -622,7 +621,7 @@ public function testBodyApplicationOctetstreamBinaryRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -902,7 +901,7 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1176,7 +1175,7 @@ public function testBodyMultipartFormdataSingleBinaryRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1448,7 +1447,7 @@ public function testEchoBodyAllOfPetRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1720,7 +1719,7 @@ public function testEchoBodyFreeFormObjectResponseStringRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1992,7 +1991,7 @@ public function testEchoBodyPetRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2264,7 +2263,7 @@ public function testEchoBodyPetResponseStringRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2536,7 +2535,7 @@ public function testEchoBodyStringEnumRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2808,7 +2807,7 @@ public function testEchoBodyTagResponseStringRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php index 89d7d982f555..6309d3f3c52c 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -397,7 +396,7 @@ public function testFormIntegerBooleanStringRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -677,7 +676,7 @@ public function testFormObjectMultipartRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1011,7 +1010,7 @@ public function testFormOneofRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php index 69be9eb3cf9a..cd390080bfe7 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php index 8f9d1dea498f..fd3e93dc97f4 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php index e26cfe86c391..e731a33c9944 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index 5beff02de3ce..b0d0973f6902 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php index 41bc2468aefe..8f758440ccbc 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -622,7 +621,7 @@ public function testBodyApplicationOctetstreamBinaryRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -902,7 +901,7 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1176,7 +1175,7 @@ public function testBodyMultipartFormdataSingleBinaryRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1448,7 +1447,7 @@ public function testEchoBodyAllOfPetRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1720,7 +1719,7 @@ public function testEchoBodyFreeFormObjectResponseStringRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1992,7 +1991,7 @@ public function testEchoBodyPetRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2264,7 +2263,7 @@ public function testEchoBodyPetResponseStringRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2536,7 +2535,7 @@ public function testEchoBodyStringEnumRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2808,7 +2807,7 @@ public function testEchoBodyTagResponseStringRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php index 89d7d982f555..6309d3f3c52c 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -397,7 +396,7 @@ public function testFormIntegerBooleanStringRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -677,7 +676,7 @@ public function testFormObjectMultipartRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1011,7 +1010,7 @@ public function testFormOneofRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php index 69be9eb3cf9a..cd390080bfe7 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php index 8f9d1dea498f..fd3e93dc97f4 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php index e26cfe86c391..e731a33c9944 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -32,7 +32,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php index e2d762bc599f..61f941a5ee7a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -370,7 +369,7 @@ public function call123TestSpecialTagsRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php index 32b76ab18826..ecda76cfdd5d 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index 8b59e1da81f1..7b5b88efd768 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -1439,7 +1438,7 @@ public function fakeHttpSignatureTestRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1703,7 +1702,7 @@ public function fakeOuterBooleanSerializeRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1967,7 +1966,7 @@ public function fakeOuterCompositeSerializeRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2231,7 +2230,7 @@ public function fakeOuterNumberSerializeRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2495,7 +2494,7 @@ public function fakeOuterStringSerializeRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2765,7 +2764,7 @@ public function fakePropertyEnumIntegerSerializeRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -3075,7 +3074,7 @@ public function fakeWith400And4xxRangeResponseEndpointRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -3353,7 +3352,7 @@ public function fakeWith400And4xxRangeResponseNo4xxDatatypeEndpointRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -3645,7 +3644,7 @@ public function fakeWith400ResponseEndpointRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -3941,7 +3940,7 @@ public function fakeWith4xxRangeResponseEndpointRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -4219,7 +4218,7 @@ public function fakeWith4xxRangeResponseNo4xxDatatypeEndpointRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -4449,7 +4448,7 @@ public function testAdditionalPropertiesReferenceRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -4671,7 +4670,7 @@ public function testBodyWithBinaryRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -4893,7 +4892,7 @@ public function testBodyWithFileSchemaRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -5141,7 +5140,7 @@ public function testBodyWithQueryParamsRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -5419,7 +5418,7 @@ public function testClientModelRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -5864,7 +5863,7 @@ public function testEndpointParametersRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -6240,7 +6239,7 @@ public function testEnumParametersRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -6773,7 +6772,7 @@ public function testInlineAdditionalPropertiesRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -7003,7 +7002,7 @@ public function testInlineFreeformAdditionalPropertiesRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -7253,7 +7252,7 @@ public function testJsonFormDataRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -7483,7 +7482,7 @@ public function testNullableRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -8063,7 +8062,7 @@ public function testStringMapReferenceRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php index 7b1a7aec8238..31484690d22b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -370,7 +369,7 @@ public function testClassnameRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php index e8c56033b667..08bd3c10fadb 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -453,7 +452,7 @@ public function addPetRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1864,7 +1863,7 @@ public function updatePetRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2188,7 +2187,7 @@ public function updatePetWithFormRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2504,7 +2503,7 @@ public function uploadFileRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -2826,7 +2825,7 @@ public function uploadFileWithRequiredFileRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php index 19cc2cc7c202..6f7f5d3aa36b 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -1083,7 +1082,7 @@ public function placeOrderRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php index bd97c4b80b6f..d57e900efaaa 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php @@ -31,7 +31,6 @@ use GuzzleHttp\ClientInterface; use GuzzleHttp\Exception\ConnectException; use GuzzleHttp\Exception\RequestException; -use GuzzleHttp\Psr7\MultipartStream; use GuzzleHttp\Psr7\Request; use GuzzleHttp\RequestOptions; use GuzzleHttp\Promise\PromiseInterface; @@ -343,7 +342,7 @@ public function createUserRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -573,7 +572,7 @@ public function createUsersWithArrayInputRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -803,7 +802,7 @@ public function createUsersWithListInputRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters @@ -1984,7 +1983,7 @@ public function updateUserRequest( } } // for HTTP post (form) - $httpBody = new MultipartStream($multipartContents); + $httpBody = new \GuzzleHttp\Psr7\MultipartStream($multipartContents); } elseif (stripos($headers['Content-Type'], 'application/json') !== false) { # if Content-Type contains "application/json", json_encode the form parameters From 1322ed89a4318dae35087201bf440ef56f104831 Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:32:55 +0200 Subject: [PATCH 08/11] [php-nextgen]: Remove whitespace --- .../src/main/resources/php-nextgen/api.mustache | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache index c3cceb385e6a..63ceaf8093e0 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -629,7 +629,8 @@ use {{invokerPackage}}\ObjectSerializer; $variables = array_key_exists('variables', $associative_array) ? $associative_array['variables'] : []; {{/servers.0}} $contentType = $associative_array['contentType'] ?? self::contentTypes['{{{operationId}}}'][0]; - {{/exts.x-group-parameters}}{{#allParams}} + {{/exts.x-group-parameters}} + {{#allParams}} {{#required}} // verify the required parameter '{{paramName}}' is set if (${{paramName}} === null || (is_array(${{paramName}}) && count(${{paramName}}) === 0)) { @@ -674,7 +675,8 @@ use {{invokerPackage}}\ObjectSerializer; throw new InvalidArgumentException('invalid value for "${{paramName}}" when calling {{classname}}.{{operationId}}, number of items must be greater than or equal to {{minItems}}.'); } {{/minItems}} - {{/hasValidation}}{{/allParams}} + {{/hasValidation}} + {{/allParams}} $resourcePath = '{{{path}}}'; $formParams = []; From e89b95ad1f7046e8f661e070a99bdad353f1eadf Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:33:09 +0200 Subject: [PATCH 09/11] [php-nextgen] Regenerate code to remove whitespace --- .../php-nextgen-streaming/src/Api/AuthApi.php | 2 - .../php-nextgen-streaming/src/Api/BodyApi.php | 19 ---- .../php-nextgen-streaming/src/Api/FormApi.php | 13 --- .../src/Api/HeaderApi.php | 6 -- .../php-nextgen-streaming/src/Api/PathApi.php | 5 - .../src/Api/QueryApi.php | 28 ------ .../echo_api/php-nextgen/src/Api/AuthApi.php | 2 - .../echo_api/php-nextgen/src/Api/BodyApi.php | 19 ---- .../echo_api/php-nextgen/src/Api/FormApi.php | 13 --- .../php-nextgen/src/Api/HeaderApi.php | 6 -- .../echo_api/php-nextgen/src/Api/PathApi.php | 5 - .../echo_api/php-nextgen/src/Api/QueryApi.php | 28 ------ .../src/Api/AnotherFakeApi.php | 2 - .../OpenAPIClient-php/src/Api/DefaultApi.php | 2 - .../OpenAPIClient-php/src/Api/FakeApi.php | 94 ------------------- .../src/Api/FakeClassnameTags123Api.php | 2 - .../OpenAPIClient-php/src/Api/PetApi.php | 25 ----- .../OpenAPIClient-php/src/Api/StoreApi.php | 7 -- .../OpenAPIClient-php/src/Api/UserApi.php | 17 ---- 19 files changed, 295 deletions(-) diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php index b0d0973f6902..2ba08cea6965 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php @@ -317,7 +317,6 @@ public function testAuthHttpBasicRequest( ): Request { - $resourcePath = '/auth/http/basic'; $formParams = []; $queryParams = []; @@ -552,7 +551,6 @@ public function testAuthHttpBearerRequest( ): Request { - $resourcePath = '/auth/http/bearer'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php index 87835783282e..edc50e22ad50 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php @@ -341,7 +341,6 @@ public function testBinaryGifRequest( ): Request { - $resourcePath = '/binary/gif'; $formParams = []; $queryParams = []; @@ -581,8 +580,6 @@ public function testBodyApplicationOctetstreamBinaryRequest( ): Request { - - $resourcePath = '/body/application/octetstream/binary'; $formParams = []; $queryParams = []; @@ -852,7 +849,6 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( string $contentType = self::contentTypes['testBodyMultipartFormdataArrayOfBinary'][0] ): Request { - // verify the required parameter 'files' is set if ($files === null || (is_array($files) && count($files) === 0)) { throw new InvalidArgumentException( @@ -860,7 +856,6 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( ); } - $resourcePath = '/body/application/octetstream/array_of_binary'; $formParams = []; $queryParams = []; @@ -1133,8 +1128,6 @@ public function testBodyMultipartFormdataSingleBinaryRequest( ): Request { - - $resourcePath = '/body/application/octetstream/single_binary'; $formParams = []; $queryParams = []; @@ -1407,8 +1400,6 @@ public function testEchoBodyAllOfPetRequest( ): Request { - - $resourcePath = '/echo/body/allOf/Pet'; $formParams = []; $queryParams = []; @@ -1679,8 +1670,6 @@ public function testEchoBodyFreeFormObjectResponseStringRequest( ): Request { - - $resourcePath = '/echo/body/FreeFormObject/response_string'; $formParams = []; $queryParams = []; @@ -1951,8 +1940,6 @@ public function testEchoBodyPetRequest( ): Request { - - $resourcePath = '/echo/body/Pet'; $formParams = []; $queryParams = []; @@ -2223,8 +2210,6 @@ public function testEchoBodyPetResponseStringRequest( ): Request { - - $resourcePath = '/echo/body/Pet/response_string'; $formParams = []; $queryParams = []; @@ -2495,8 +2480,6 @@ public function testEchoBodyStringEnumRequest( ): Request { - - $resourcePath = '/echo/body/string_enum'; $formParams = []; $queryParams = []; @@ -2767,8 +2750,6 @@ public function testEchoBodyTagResponseStringRequest( ): Request { - - $resourcePath = '/echo/body/Tag/response_string'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php index 6309d3f3c52c..a8fabb30a8d2 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php @@ -350,10 +350,6 @@ public function testFormIntegerBooleanStringRequest( ): Request { - - - - $resourcePath = '/form/integer/boolean/string'; $formParams = []; $queryParams = []; @@ -627,7 +623,6 @@ public function testFormObjectMultipartRequest( string $contentType = self::contentTypes['testFormObjectMultipart'][0] ): Request { - // verify the required parameter 'marker' is set if ($marker === null || (is_array($marker) && count($marker) === 0)) { throw new InvalidArgumentException( @@ -635,7 +630,6 @@ public function testFormObjectMultipartRequest( ); } - $resourcePath = '/form/object/multipart'; $formParams = []; $queryParams = []; @@ -958,13 +952,6 @@ public function testFormOneofRequest( ): Request { - - - - - - - $resourcePath = '/form/oneof'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php index cd390080bfe7..285043fa661c 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php @@ -364,12 +364,6 @@ public function testHeaderIntegerBooleanStringEnumsRequest( ): Request { - - - - - - $resourcePath = '/header/integer/boolean/string/enums'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php index fd3e93dc97f4..a3cf94826000 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php @@ -353,28 +353,24 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE 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 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 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( @@ -382,7 +378,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE ); } - $resourcePath = '/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php index e731a33c9944..ceffaa05d82a 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php @@ -364,9 +364,6 @@ public function testEnumRefStringRequest( ): Request { - - - $resourcePath = '/query/enum_ref_string'; $formParams = []; $queryParams = []; @@ -644,10 +641,6 @@ public function testQueryDatetimeDateStringRequest( ): Request { - - - - $resourcePath = '/query/datetime/date/string'; $formParams = []; $queryParams = []; @@ -934,10 +927,6 @@ public function testQueryIntegerBooleanStringRequest( ): Request { - - - - $resourcePath = '/query/integer/boolean/string'; $formParams = []; $queryParams = []; @@ -1204,8 +1193,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectRequest( ): Request { - - $resourcePath = '/query/style_deepObject/explode_true/object'; $formParams = []; $queryParams = []; @@ -1454,8 +1441,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( ): Request { - - $resourcePath = '/query/style_deepObject/explode_true/object/allOf'; $formParams = []; $queryParams = []; @@ -1704,8 +1689,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( ): Request { - - $resourcePath = '/query/style_form/explode_false/array_integer'; $formParams = []; $queryParams = []; @@ -1954,8 +1937,6 @@ public function testQueryStyleFormExplodeFalseArrayStringRequest( ): Request { - - $resourcePath = '/query/style_form/explode_false/array_string'; $formParams = []; $queryParams = []; @@ -2204,8 +2185,6 @@ public function testQueryStyleFormExplodeTrueArrayStringRequest( ): Request { - - $resourcePath = '/query/style_form/explode_true/array_string'; $formParams = []; $queryParams = []; @@ -2454,8 +2433,6 @@ public function testQueryStyleFormExplodeTrueObjectRequest( ): Request { - - $resourcePath = '/query/style_form/explode_true/object'; $formParams = []; $queryParams = []; @@ -2704,8 +2681,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfRequest( ): Request { - - $resourcePath = '/query/style_form/explode_true/object/allOf'; $formParams = []; $queryParams = []; @@ -2964,9 +2939,6 @@ public function testQueryStyleJsonSerializationObjectRequest( ): Request { - - - $resourcePath = '/query/style_jsonSerialization/object'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index b0d0973f6902..2ba08cea6965 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -317,7 +317,6 @@ public function testAuthHttpBasicRequest( ): Request { - $resourcePath = '/auth/http/basic'; $formParams = []; $queryParams = []; @@ -552,7 +551,6 @@ public function testAuthHttpBearerRequest( ): Request { - $resourcePath = '/auth/http/bearer'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php index 8f758440ccbc..4842c3685fa7 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -341,7 +341,6 @@ public function testBinaryGifRequest( ): Request { - $resourcePath = '/binary/gif'; $formParams = []; $queryParams = []; @@ -581,8 +580,6 @@ public function testBodyApplicationOctetstreamBinaryRequest( ): Request { - - $resourcePath = '/body/application/octetstream/binary'; $formParams = []; $queryParams = []; @@ -852,7 +849,6 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( string $contentType = self::contentTypes['testBodyMultipartFormdataArrayOfBinary'][0] ): Request { - // verify the required parameter 'files' is set if ($files === null || (is_array($files) && count($files) === 0)) { throw new InvalidArgumentException( @@ -860,7 +856,6 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( ); } - $resourcePath = '/body/application/octetstream/array_of_binary'; $formParams = []; $queryParams = []; @@ -1133,8 +1128,6 @@ public function testBodyMultipartFormdataSingleBinaryRequest( ): Request { - - $resourcePath = '/body/application/octetstream/single_binary'; $formParams = []; $queryParams = []; @@ -1407,8 +1400,6 @@ public function testEchoBodyAllOfPetRequest( ): Request { - - $resourcePath = '/echo/body/allOf/Pet'; $formParams = []; $queryParams = []; @@ -1679,8 +1670,6 @@ public function testEchoBodyFreeFormObjectResponseStringRequest( ): Request { - - $resourcePath = '/echo/body/FreeFormObject/response_string'; $formParams = []; $queryParams = []; @@ -1951,8 +1940,6 @@ public function testEchoBodyPetRequest( ): Request { - - $resourcePath = '/echo/body/Pet'; $formParams = []; $queryParams = []; @@ -2223,8 +2210,6 @@ public function testEchoBodyPetResponseStringRequest( ): Request { - - $resourcePath = '/echo/body/Pet/response_string'; $formParams = []; $queryParams = []; @@ -2495,8 +2480,6 @@ public function testEchoBodyStringEnumRequest( ): Request { - - $resourcePath = '/echo/body/string_enum'; $formParams = []; $queryParams = []; @@ -2767,8 +2750,6 @@ public function testEchoBodyTagResponseStringRequest( ): Request { - - $resourcePath = '/echo/body/Tag/response_string'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php index 6309d3f3c52c..a8fabb30a8d2 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -350,10 +350,6 @@ public function testFormIntegerBooleanStringRequest( ): Request { - - - - $resourcePath = '/form/integer/boolean/string'; $formParams = []; $queryParams = []; @@ -627,7 +623,6 @@ public function testFormObjectMultipartRequest( string $contentType = self::contentTypes['testFormObjectMultipart'][0] ): Request { - // verify the required parameter 'marker' is set if ($marker === null || (is_array($marker) && count($marker) === 0)) { throw new InvalidArgumentException( @@ -635,7 +630,6 @@ public function testFormObjectMultipartRequest( ); } - $resourcePath = '/form/object/multipart'; $formParams = []; $queryParams = []; @@ -958,13 +952,6 @@ public function testFormOneofRequest( ): Request { - - - - - - - $resourcePath = '/form/oneof'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php index cd390080bfe7..285043fa661c 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -364,12 +364,6 @@ public function testHeaderIntegerBooleanStringEnumsRequest( ): Request { - - - - - - $resourcePath = '/header/integer/boolean/string/enums'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php index fd3e93dc97f4..a3cf94826000 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -353,28 +353,24 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE 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 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 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( @@ -382,7 +378,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE ); } - $resourcePath = '/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}'; $formParams = []; $queryParams = []; diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php index e731a33c9944..ceffaa05d82a 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -364,9 +364,6 @@ public function testEnumRefStringRequest( ): Request { - - - $resourcePath = '/query/enum_ref_string'; $formParams = []; $queryParams = []; @@ -644,10 +641,6 @@ public function testQueryDatetimeDateStringRequest( ): Request { - - - - $resourcePath = '/query/datetime/date/string'; $formParams = []; $queryParams = []; @@ -934,10 +927,6 @@ public function testQueryIntegerBooleanStringRequest( ): Request { - - - - $resourcePath = '/query/integer/boolean/string'; $formParams = []; $queryParams = []; @@ -1204,8 +1193,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectRequest( ): Request { - - $resourcePath = '/query/style_deepObject/explode_true/object'; $formParams = []; $queryParams = []; @@ -1454,8 +1441,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( ): Request { - - $resourcePath = '/query/style_deepObject/explode_true/object/allOf'; $formParams = []; $queryParams = []; @@ -1704,8 +1689,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( ): Request { - - $resourcePath = '/query/style_form/explode_false/array_integer'; $formParams = []; $queryParams = []; @@ -1954,8 +1937,6 @@ public function testQueryStyleFormExplodeFalseArrayStringRequest( ): Request { - - $resourcePath = '/query/style_form/explode_false/array_string'; $formParams = []; $queryParams = []; @@ -2204,8 +2185,6 @@ public function testQueryStyleFormExplodeTrueArrayStringRequest( ): Request { - - $resourcePath = '/query/style_form/explode_true/array_string'; $formParams = []; $queryParams = []; @@ -2454,8 +2433,6 @@ public function testQueryStyleFormExplodeTrueObjectRequest( ): Request { - - $resourcePath = '/query/style_form/explode_true/object'; $formParams = []; $queryParams = []; @@ -2704,8 +2681,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfRequest( ): Request { - - $resourcePath = '/query/style_form/explode_true/object/allOf'; $formParams = []; $queryParams = []; @@ -2964,9 +2939,6 @@ public function testQueryStyleJsonSerializationObjectRequest( ): Request { - - - $resourcePath = '/query/style_jsonSerialization/object'; $formParams = []; $queryParams = []; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php index 61f941a5ee7a..febc2db820f0 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php @@ -322,7 +322,6 @@ public function call123TestSpecialTagsRequest( string $contentType = self::contentTypes['call123TestSpecialTags'][0] ): Request { - // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { throw new InvalidArgumentException( @@ -330,7 +329,6 @@ public function call123TestSpecialTagsRequest( ); } - $resourcePath = '/another-fake/dummy'; $formParams = []; $queryParams = []; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php index ecda76cfdd5d..7a3b234c8b5a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php @@ -301,7 +301,6 @@ public function errorRequest( ): Request { - $resourcePath = '/error'; $formParams = []; $queryParams = []; @@ -523,7 +522,6 @@ public function fooGetRequest( ): Request { - $resourcePath = '/foo'; $formParams = []; $queryParams = []; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index 7b5b88efd768..bab577aa30c6 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -395,7 +395,6 @@ public function fakeBigDecimalMapRequest( ): Request { - $resourcePath = '/fake/BigDecimalMap'; $formParams = []; $queryParams = []; @@ -611,7 +610,6 @@ public function fakeDeletePetRequest( string $contentType = self::contentTypes['fakeDeletePet'][0] ): Request { - // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new InvalidArgumentException( @@ -619,7 +617,6 @@ public function fakeDeletePetRequest( ); } - $resourcePath = '/fake/pet/{pet_id}'; $formParams = []; $queryParams = []; @@ -886,21 +883,18 @@ public function fakeEnumEndpointRequest( string $contentType = self::contentTypes['fakeEnumEndpoint'][0] ): Request { - // verify the required parameter 'enum_class' is set if ($enum_class === null || (is_array($enum_class) && count($enum_class) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $enum_class when calling fakeEnumEndpoint' ); } - // verify the required parameter 'enum_class_array' is set if ($enum_class_array === null || (is_array($enum_class_array) && count($enum_class_array) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $enum_class_array when calling fakeEnumEndpoint' ); } - // verify the required parameter 'enum_class_map' is set if ($enum_class_map === null || (is_array($enum_class_map) && count($enum_class_map) === 0)) { throw new InvalidArgumentException( @@ -908,7 +902,6 @@ public function fakeEnumEndpointRequest( ); } - $resourcePath = '/fake/enum/endpoint'; $formParams = []; $queryParams = []; @@ -1165,7 +1158,6 @@ public function fakeHealthGetRequest( ): Request { - $resourcePath = '/fake/health'; $formParams = []; $queryParams = []; @@ -1376,7 +1368,6 @@ public function fakeHttpSignatureTestRequest( string $contentType = self::contentTypes['fakeHttpSignatureTest'][0] ): Request { - // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new InvalidArgumentException( @@ -1384,9 +1375,6 @@ public function fakeHttpSignatureTestRequest( ); } - - - $resourcePath = '/fake/http-signature-test'; $formParams = []; $queryParams = []; @@ -1662,8 +1650,6 @@ public function fakeOuterBooleanSerializeRequest( ): Request { - - $resourcePath = '/fake/outer/boolean'; $formParams = []; $queryParams = []; @@ -1926,8 +1912,6 @@ public function fakeOuterCompositeSerializeRequest( ): Request { - - $resourcePath = '/fake/outer/composite'; $formParams = []; $queryParams = []; @@ -2190,8 +2174,6 @@ public function fakeOuterNumberSerializeRequest( ): Request { - - $resourcePath = '/fake/outer/number'; $formParams = []; $queryParams = []; @@ -2454,8 +2436,6 @@ public function fakeOuterStringSerializeRequest( ): Request { - - $resourcePath = '/fake/outer/string'; $formParams = []; $queryParams = []; @@ -2717,7 +2697,6 @@ public function fakePropertyEnumIntegerSerializeRequest( string $contentType = self::contentTypes['fakePropertyEnumIntegerSerialize'][0] ): Request { - // verify the required parameter 'outer_object_with_enum_property' is set if ($outer_object_with_enum_property === null || (is_array($outer_object_with_enum_property) && count($outer_object_with_enum_property) === 0)) { throw new InvalidArgumentException( @@ -2725,7 +2704,6 @@ public function fakePropertyEnumIntegerSerializeRequest( ); } - $resourcePath = '/fake/property/enum-int'; $formParams = []; $queryParams = []; @@ -3027,7 +3005,6 @@ public function fakeWith400And4xxRangeResponseEndpointRequest( string $contentType = self::contentTypes['fakeWith400And4xxRangeResponseEndpoint'][0] ): Request { - // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new InvalidArgumentException( @@ -3035,7 +3012,6 @@ public function fakeWith400And4xxRangeResponseEndpointRequest( ); } - $resourcePath = '/fake/with_400_and_4xx_range_response/endpoint'; $formParams = []; $queryParams = []; @@ -3305,7 +3281,6 @@ public function fakeWith400And4xxRangeResponseNo4xxDatatypeEndpointRequest( string $contentType = self::contentTypes['fakeWith400And4xxRangeResponseNo4xxDatatypeEndpoint'][0] ): Request { - // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new InvalidArgumentException( @@ -3313,7 +3288,6 @@ public function fakeWith400And4xxRangeResponseNo4xxDatatypeEndpointRequest( ); } - $resourcePath = '/fake/with_400_and_4xx_range_response_no_4xx_datatype/endpoint'; $formParams = []; $queryParams = []; @@ -3597,7 +3571,6 @@ public function fakeWith400ResponseEndpointRequest( string $contentType = self::contentTypes['fakeWith400ResponseEndpoint'][0] ): Request { - // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new InvalidArgumentException( @@ -3605,7 +3578,6 @@ public function fakeWith400ResponseEndpointRequest( ); } - $resourcePath = '/fake/with_400_response/endpoint'; $formParams = []; $queryParams = []; @@ -3893,7 +3865,6 @@ public function fakeWith4xxRangeResponseEndpointRequest( string $contentType = self::contentTypes['fakeWith4xxRangeResponseEndpoint'][0] ): Request { - // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new InvalidArgumentException( @@ -3901,7 +3872,6 @@ public function fakeWith4xxRangeResponseEndpointRequest( ); } - $resourcePath = '/fake/with_4xx_range_response/endpoint'; $formParams = []; $queryParams = []; @@ -4171,7 +4141,6 @@ public function fakeWith4xxRangeResponseNo4xxDatatypeEndpointRequest( string $contentType = self::contentTypes['fakeWith4xxRangeResponseNo4xxDatatypeEndpoint'][0] ): Request { - // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new InvalidArgumentException( @@ -4179,7 +4148,6 @@ public function fakeWith4xxRangeResponseNo4xxDatatypeEndpointRequest( ); } - $resourcePath = '/fake/with_4xx_range_response_no_4xx_datatype/endpoint'; $formParams = []; $queryParams = []; @@ -4401,7 +4369,6 @@ public function testAdditionalPropertiesReferenceRequest( string $contentType = self::contentTypes['testAdditionalPropertiesReference'][0] ): Request { - // verify the required parameter 'request_body' is set if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { throw new InvalidArgumentException( @@ -4409,7 +4376,6 @@ public function testAdditionalPropertiesReferenceRequest( ); } - $resourcePath = '/fake/additionalProperties-reference'; $formParams = []; $queryParams = []; @@ -4623,7 +4589,6 @@ public function testBodyWithBinaryRequest( string $contentType = self::contentTypes['testBodyWithBinary'][0] ): Request { - // verify the required parameter 'body' is set if ($body === null || (is_array($body) && count($body) === 0)) { throw new InvalidArgumentException( @@ -4631,7 +4596,6 @@ public function testBodyWithBinaryRequest( ); } - $resourcePath = '/fake/body-with-binary'; $formParams = []; $queryParams = []; @@ -4845,7 +4809,6 @@ public function testBodyWithFileSchemaRequest( string $contentType = self::contentTypes['testBodyWithFileSchema'][0] ): Request { - // verify the required parameter 'file_schema_test_class' is set if ($file_schema_test_class === null || (is_array($file_schema_test_class) && count($file_schema_test_class) === 0)) { throw new InvalidArgumentException( @@ -4853,7 +4816,6 @@ public function testBodyWithFileSchemaRequest( ); } - $resourcePath = '/fake/body-with-file-schema'; $formParams = []; $queryParams = []; @@ -5077,14 +5039,12 @@ public function testBodyWithQueryParamsRequest( string $contentType = self::contentTypes['testBodyWithQueryParams'][0] ): Request { - // verify the required parameter 'query' is set if ($query === null || (is_array($query) && count($query) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $query when calling testBodyWithQueryParams' ); } - // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new InvalidArgumentException( @@ -5092,7 +5052,6 @@ public function testBodyWithQueryParamsRequest( ); } - $resourcePath = '/fake/body-with-query-params'; $formParams = []; $queryParams = []; @@ -5371,7 +5330,6 @@ public function testClientModelRequest( string $contentType = self::contentTypes['testClientModel'][0] ): Request { - // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { throw new InvalidArgumentException( @@ -5379,7 +5337,6 @@ public function testClientModelRequest( ); } - $resourcePath = '/fake'; $formParams = []; $queryParams = []; @@ -5731,7 +5688,6 @@ public function testEndpointParametersRequest( string $contentType = self::contentTypes['testEndpointParameters'][0] ): Request { - // verify the required parameter 'number' is set if ($number === null || (is_array($number) && count($number) === 0)) { throw new InvalidArgumentException( @@ -5744,7 +5700,6 @@ public function testEndpointParametersRequest( if ($number < 32.1) { throw new InvalidArgumentException('invalid value for "$number" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 32.1.'); } - // verify the required parameter 'double' is set if ($double === null || (is_array($double) && count($double) === 0)) { throw new InvalidArgumentException( @@ -5757,7 +5712,6 @@ public function testEndpointParametersRequest( if ($double < 67.8) { throw new InvalidArgumentException('invalid value for "$double" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 67.8.'); } - // verify the required parameter 'pattern_without_delimiter' is set if ($pattern_without_delimiter === null || (is_array($pattern_without_delimiter) && count($pattern_without_delimiter) === 0)) { throw new InvalidArgumentException( @@ -5767,48 +5721,36 @@ public function testEndpointParametersRequest( if (!preg_match("/^[A-Z].*/", $pattern_without_delimiter)) { throw new InvalidArgumentException("invalid value for \"pattern_without_delimiter\" when calling FakeApi.testEndpointParameters, must conform to the pattern /^[A-Z].*/."); } - // verify the required parameter 'byte' is set if ($byte === null || (is_array($byte) && count($byte) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $byte when calling testEndpointParameters' ); } - if ($integer !== null && $integer > 100) { throw new InvalidArgumentException('invalid value for "$integer" when calling FakeApi.testEndpointParameters, must be smaller than or equal to 100.'); } if ($integer !== null && $integer < 10) { throw new InvalidArgumentException('invalid value for "$integer" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.'); } - if ($int32 !== null && $int32 > 200) { throw new InvalidArgumentException('invalid value for "$int32" when calling FakeApi.testEndpointParameters, must be smaller than or equal to 200.'); } if ($int32 !== null && $int32 < 20) { throw new InvalidArgumentException('invalid value for "$int32" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 20.'); } - - if ($float !== null && $float > 987.6) { throw new InvalidArgumentException('invalid value for "$float" when calling FakeApi.testEndpointParameters, must be smaller than or equal to 987.6.'); } - if ($string !== null && !preg_match("/[a-z]/i", $string)) { throw new InvalidArgumentException("invalid value for \"string\" when calling FakeApi.testEndpointParameters, must conform to the pattern /[a-z]/i."); } - - - - if ($password !== null && strlen($password) > 64) { throw new InvalidArgumentException('invalid length for "$password" when calling FakeApi.testEndpointParameters, must be smaller than or equal to 64.'); } if ($password !== null && strlen($password) < 10) { throw new InvalidArgumentException('invalid length for "$password" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.'); } - - $resourcePath = '/fake'; $formParams = []; @@ -6132,16 +6074,6 @@ public function testEnumParametersRequest( ): Request { - - - - - - - - - - $resourcePath = '/fake'; $formParams = []; $queryParams = []; @@ -6460,21 +6392,18 @@ public function testGroupParametersRequest( $boolean_group = array_key_exists('boolean_group', $associative_array) ? $associative_array['boolean_group'] : null; $int64_group = array_key_exists('int64_group', $associative_array) ? $associative_array['int64_group'] : null; $contentType = $associative_array['contentType'] ?? self::contentTypes['testGroupParameters'][0]; - // verify the required parameter 'required_string_group' is set if ($required_string_group === null || (is_array($required_string_group) && count($required_string_group) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $required_string_group when calling testGroupParameters' ); } - // verify the required parameter 'required_boolean_group' is set if ($required_boolean_group === null || (is_array($required_boolean_group) && count($required_boolean_group) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $required_boolean_group when calling testGroupParameters' ); } - // verify the required parameter 'required_int64_group' is set if ($required_int64_group === null || (is_array($required_int64_group) && count($required_int64_group) === 0)) { throw new InvalidArgumentException( @@ -6482,10 +6411,6 @@ public function testGroupParametersRequest( ); } - - - - $resourcePath = '/fake'; $formParams = []; $queryParams = []; @@ -6725,7 +6650,6 @@ public function testInlineAdditionalPropertiesRequest( string $contentType = self::contentTypes['testInlineAdditionalProperties'][0] ): Request { - // verify the required parameter 'request_body' is set if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { throw new InvalidArgumentException( @@ -6733,7 +6657,6 @@ public function testInlineAdditionalPropertiesRequest( ); } - $resourcePath = '/fake/inline-additionalProperties'; $formParams = []; $queryParams = []; @@ -6955,7 +6878,6 @@ public function testInlineFreeformAdditionalPropertiesRequest( string $contentType = self::contentTypes['testInlineFreeformAdditionalProperties'][0] ): Request { - // verify the required parameter 'test_inline_freeform_additional_properties_request' is set if ($test_inline_freeform_additional_properties_request === null || (is_array($test_inline_freeform_additional_properties_request) && count($test_inline_freeform_additional_properties_request) === 0)) { throw new InvalidArgumentException( @@ -6963,7 +6885,6 @@ public function testInlineFreeformAdditionalPropertiesRequest( ); } - $resourcePath = '/fake/inline-freeform-additionalProperties'; $formParams = []; $queryParams = []; @@ -7195,14 +7116,12 @@ public function testJsonFormDataRequest( string $contentType = self::contentTypes['testJsonFormData'][0] ): Request { - // verify the required parameter 'param' is set if ($param === null || (is_array($param) && count($param) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $param when calling testJsonFormData' ); } - // verify the required parameter 'param2' is set if ($param2 === null || (is_array($param2) && count($param2) === 0)) { throw new InvalidArgumentException( @@ -7210,7 +7129,6 @@ public function testJsonFormDataRequest( ); } - $resourcePath = '/fake/jsonFormData'; $formParams = []; $queryParams = []; @@ -7435,7 +7353,6 @@ public function testNullableRequest( string $contentType = self::contentTypes['testNullable'][0] ): Request { - // verify the required parameter 'child_with_nullable' is set if ($child_with_nullable === null || (is_array($child_with_nullable) && count($child_with_nullable) === 0)) { throw new InvalidArgumentException( @@ -7443,7 +7360,6 @@ public function testNullableRequest( ); } - $resourcePath = '/fake/nullable'; $formParams = []; $queryParams = []; @@ -7717,42 +7633,36 @@ public function testQueryParameterCollectionFormatRequest( string $contentType = self::contentTypes['testQueryParameterCollectionFormat'][0] ): Request { - // verify the required parameter 'pipe' is set if ($pipe === null || (is_array($pipe) && count($pipe) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $pipe when calling testQueryParameterCollectionFormat' ); } - // verify the required parameter 'ioutil' is set if ($ioutil === null || (is_array($ioutil) && count($ioutil) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $ioutil when calling testQueryParameterCollectionFormat' ); } - // verify the required parameter 'http' is set if ($http === null || (is_array($http) && count($http) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $http when calling testQueryParameterCollectionFormat' ); } - // verify the required parameter 'url' is set if ($url === null || (is_array($url) && count($url) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $url when calling testQueryParameterCollectionFormat' ); } - // verify the required parameter 'context' is set if ($context === null || (is_array($context) && count($context) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $context when calling testQueryParameterCollectionFormat' ); } - // verify the required parameter 'allow_empty' is set if ($allow_empty === null || (is_array($allow_empty) && count($allow_empty) === 0)) { throw new InvalidArgumentException( @@ -7760,8 +7670,6 @@ public function testQueryParameterCollectionFormatRequest( ); } - - $resourcePath = '/fake/test-query-parameters'; $formParams = []; $queryParams = []; @@ -8015,7 +7923,6 @@ public function testStringMapReferenceRequest( string $contentType = self::contentTypes['testStringMapReference'][0] ): Request { - // verify the required parameter 'request_body' is set if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { throw new InvalidArgumentException( @@ -8023,7 +7930,6 @@ public function testStringMapReferenceRequest( ); } - $resourcePath = '/fake/stringMap-reference'; $formParams = []; $queryParams = []; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php index 31484690d22b..2e31e6e5c9d3 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php @@ -322,7 +322,6 @@ public function testClassnameRequest( string $contentType = self::contentTypes['testClassname'][0] ): Request { - // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { throw new InvalidArgumentException( @@ -330,7 +329,6 @@ public function testClassnameRequest( ); } - $resourcePath = '/fake_classname_test'; $formParams = []; $queryParams = []; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php index 08bd3c10fadb..c0d6b70fedf4 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php @@ -405,7 +405,6 @@ public function addPetRequest( string $contentType = self::contentTypes['addPet'][0] ): Request { - // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new InvalidArgumentException( @@ -413,7 +412,6 @@ public function addPetRequest( ); } - $resourcePath = '/pet'; $formParams = []; $queryParams = []; @@ -706,7 +704,6 @@ public function deletePetRequest( string $contentType = self::contentTypes['deletePet'][0] ): Request { - // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new InvalidArgumentException( @@ -714,8 +711,6 @@ public function deletePetRequest( ); } - - $resourcePath = '/pet/{petId}'; $formParams = []; $queryParams = []; @@ -971,7 +966,6 @@ public function findPetsByStatusRequest( string $contentType = self::contentTypes['findPetsByStatus'][0] ): Request { - // verify the required parameter 'status' is set if ($status === null || (is_array($status) && count($status) === 0)) { throw new InvalidArgumentException( @@ -979,7 +973,6 @@ public function findPetsByStatusRequest( ); } - $resourcePath = '/pet/findByStatus'; $formParams = []; $queryParams = []; @@ -1237,14 +1230,12 @@ public function findPetsByTagsRequest( string $contentType = self::contentTypes['findPetsByTags'][0] ): Request { - // verify the required parameter 'tags' is set if ($tags === null || (is_array($tags) && count($tags) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $tags when calling findPetsByTags' ); } - $resourcePath = '/pet/findByTags'; $formParams = []; @@ -1498,7 +1489,6 @@ public function getPetByIdRequest( string $contentType = self::contentTypes['getPetById'][0] ): Request { - // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new InvalidArgumentException( @@ -1506,7 +1496,6 @@ public function getPetByIdRequest( ); } - $resourcePath = '/pet/{petId}'; $formParams = []; $queryParams = []; @@ -1816,7 +1805,6 @@ public function updatePetRequest( string $contentType = self::contentTypes['updatePet'][0] ): Request { - // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { throw new InvalidArgumentException( @@ -1824,7 +1812,6 @@ public function updatePetRequest( ); } - $resourcePath = '/pet'; $formParams = []; $queryParams = []; @@ -2127,7 +2114,6 @@ public function updatePetWithFormRequest( string $contentType = self::contentTypes['updatePetWithForm'][0] ): Request { - // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new InvalidArgumentException( @@ -2135,9 +2121,6 @@ public function updatePetWithFormRequest( ); } - - - $resourcePath = '/pet/{petId}'; $formParams = []; $queryParams = []; @@ -2443,7 +2426,6 @@ public function uploadFileRequest( string $contentType = self::contentTypes['uploadFile'][0] ): Request { - // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new InvalidArgumentException( @@ -2451,9 +2433,6 @@ public function uploadFileRequest( ); } - - - $resourcePath = '/pet/{petId}/uploadImage'; $formParams = []; $queryParams = []; @@ -2759,14 +2738,12 @@ public function uploadFileWithRequiredFileRequest( string $contentType = self::contentTypes['uploadFileWithRequiredFile'][0] ): Request { - // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $pet_id when calling uploadFileWithRequiredFile' ); } - // verify the required parameter 'required_file' is set if ($required_file === null || (is_array($required_file) && count($required_file) === 0)) { throw new InvalidArgumentException( @@ -2774,8 +2751,6 @@ public function uploadFileWithRequiredFileRequest( ); } - - $resourcePath = '/fake/{petId}/uploadImageWithRequiredFile'; $formParams = []; $queryParams = []; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php index 6f7f5d3aa36b..896dbc1db660 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php @@ -283,7 +283,6 @@ public function deleteOrderRequest( string $contentType = self::contentTypes['deleteOrder'][0] ): Request { - // verify the required parameter 'order_id' is set if ($order_id === null || (is_array($order_id) && count($order_id) === 0)) { throw new InvalidArgumentException( @@ -291,7 +290,6 @@ public function deleteOrderRequest( ); } - $resourcePath = '/store/order/{order_id}'; $formParams = []; $queryParams = []; @@ -529,7 +527,6 @@ public function getInventoryRequest( ): Request { - $resourcePath = '/store/inventory'; $formParams = []; $queryParams = []; @@ -774,7 +771,6 @@ public function getOrderByIdRequest( string $contentType = self::contentTypes['getOrderById'][0] ): Request { - // verify the required parameter 'order_id' is set if ($order_id === null || (is_array($order_id) && count($order_id) === 0)) { throw new InvalidArgumentException( @@ -787,7 +783,6 @@ public function getOrderByIdRequest( if ($order_id < 1) { throw new InvalidArgumentException('invalid value for "$order_id" when calling StoreApi.getOrderById, must be bigger than or equal to 1.'); } - $resourcePath = '/store/order/{order_id}'; $formParams = []; @@ -1035,7 +1030,6 @@ public function placeOrderRequest( string $contentType = self::contentTypes['placeOrder'][0] ): Request { - // verify the required parameter 'order' is set if ($order === null || (is_array($order) && count($order) === 0)) { throw new InvalidArgumentException( @@ -1043,7 +1037,6 @@ public function placeOrderRequest( ); } - $resourcePath = '/store/order'; $formParams = []; $queryParams = []; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php index d57e900efaaa..b632df09074a 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php @@ -295,7 +295,6 @@ public function createUserRequest( string $contentType = self::contentTypes['createUser'][0] ): Request { - // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new InvalidArgumentException( @@ -303,7 +302,6 @@ public function createUserRequest( ); } - $resourcePath = '/user'; $formParams = []; $queryParams = []; @@ -525,7 +523,6 @@ public function createUsersWithArrayInputRequest( string $contentType = self::contentTypes['createUsersWithArrayInput'][0] ): Request { - // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new InvalidArgumentException( @@ -533,7 +530,6 @@ public function createUsersWithArrayInputRequest( ); } - $resourcePath = '/user/createWithArray'; $formParams = []; $queryParams = []; @@ -755,7 +751,6 @@ public function createUsersWithListInputRequest( string $contentType = self::contentTypes['createUsersWithListInput'][0] ): Request { - // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new InvalidArgumentException( @@ -763,7 +758,6 @@ public function createUsersWithListInputRequest( ); } - $resourcePath = '/user/createWithList'; $formParams = []; $queryParams = []; @@ -985,7 +979,6 @@ public function deleteUserRequest( string $contentType = self::contentTypes['deleteUser'][0] ): Request { - // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { throw new InvalidArgumentException( @@ -993,7 +986,6 @@ public function deleteUserRequest( ); } - $resourcePath = '/user/{username}'; $formParams = []; $queryParams = []; @@ -1240,7 +1232,6 @@ public function getUserByNameRequest( string $contentType = self::contentTypes['getUserByName'][0] ): Request { - // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { throw new InvalidArgumentException( @@ -1248,7 +1239,6 @@ public function getUserByNameRequest( ); } - $resourcePath = '/user/{username}'; $formParams = []; $queryParams = []; @@ -1505,14 +1495,12 @@ public function loginUserRequest( string $contentType = self::contentTypes['loginUser'][0] ): Request { - // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $username when calling loginUser' ); } - // verify the required parameter 'password' is set if ($password === null || (is_array($password) && count($password) === 0)) { throw new InvalidArgumentException( @@ -1520,7 +1508,6 @@ public function loginUserRequest( ); } - $resourcePath = '/user/login'; $formParams = []; $queryParams = []; @@ -1720,7 +1707,6 @@ public function logoutUserRequest( ): Request { - $resourcePath = '/user/logout'; $formParams = []; $queryParams = []; @@ -1921,14 +1907,12 @@ public function updateUserRequest( string $contentType = self::contentTypes['updateUser'][0] ): Request { - // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { throw new InvalidArgumentException( 'Missing the required parameter $username when calling updateUser' ); } - // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { throw new InvalidArgumentException( @@ -1936,7 +1920,6 @@ public function updateUserRequest( ); } - $resourcePath = '/user/{username}'; $formParams = []; $queryParams = []; From 1125512ecc98f7413659f5b15f2a284b85451181 Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:37:33 +0200 Subject: [PATCH 10/11] [php-nextgen] Remove form params and query params if not used --- .../src/main/resources/php-nextgen/api.mustache | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache index 63ceaf8093e0..b25a293e68c8 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -679,8 +679,12 @@ use {{invokerPackage}}\ObjectSerializer; {{/allParams}} $resourcePath = '{{{path}}}'; + {{#hasBodyOrFormParams}} $formParams = []; + {{/hasBodyOrFormParams}} + {{#hasQueryParams}} $queryParams = []; + {{/hasQueryParams}} $headerParams = []; $httpBody = ''; $multipart = false; From c8962bda000e6230b9da318dcb7562b905e356bf Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 17:37:46 +0200 Subject: [PATCH 11/11] [php-nextgen] Regenerate code --- .../php-nextgen-streaming/src/Api/AuthApi.php | 4 --- .../php-nextgen-streaming/src/Api/BodyApi.php | 11 ------- .../php-nextgen-streaming/src/Api/FormApi.php | 3 -- .../src/Api/HeaderApi.php | 2 -- .../php-nextgen-streaming/src/Api/PathApi.php | 2 -- .../src/Api/QueryApi.php | 11 ------- .../echo_api/php-nextgen/src/Api/AuthApi.php | 4 --- .../echo_api/php-nextgen/src/Api/BodyApi.php | 11 ------- .../echo_api/php-nextgen/src/Api/FormApi.php | 3 -- .../php-nextgen/src/Api/HeaderApi.php | 2 -- .../echo_api/php-nextgen/src/Api/PathApi.php | 2 -- .../echo_api/php-nextgen/src/Api/QueryApi.php | 11 ------- .../src/Api/AnotherFakeApi.php | 1 - .../OpenAPIClient-php/src/Api/DefaultApi.php | 4 --- .../OpenAPIClient-php/src/Api/FakeApi.php | 29 ------------------- .../src/Api/FakeClassnameTags123Api.php | 1 - .../OpenAPIClient-php/src/Api/PetApi.php | 11 ------- .../OpenAPIClient-php/src/Api/StoreApi.php | 7 ----- .../OpenAPIClient-php/src/Api/UserApi.php | 11 ------- 19 files changed, 130 deletions(-) diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php index 2ba08cea6965..386cac3596eb 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php @@ -318,8 +318,6 @@ public function testAuthHttpBasicRequest( { $resourcePath = '/auth/http/basic'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -552,8 +550,6 @@ public function testAuthHttpBearerRequest( { $resourcePath = '/auth/http/bearer'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php index edc50e22ad50..424440f6989b 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php @@ -342,8 +342,6 @@ public function testBinaryGifRequest( { $resourcePath = '/binary/gif'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -582,7 +580,6 @@ public function testBodyApplicationOctetstreamBinaryRequest( $resourcePath = '/body/application/octetstream/binary'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -858,7 +855,6 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( $resourcePath = '/body/application/octetstream/array_of_binary'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1130,7 +1126,6 @@ public function testBodyMultipartFormdataSingleBinaryRequest( $resourcePath = '/body/application/octetstream/single_binary'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1402,7 +1397,6 @@ public function testEchoBodyAllOfPetRequest( $resourcePath = '/echo/body/allOf/Pet'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1672,7 +1666,6 @@ public function testEchoBodyFreeFormObjectResponseStringRequest( $resourcePath = '/echo/body/FreeFormObject/response_string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1942,7 +1935,6 @@ public function testEchoBodyPetRequest( $resourcePath = '/echo/body/Pet'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2212,7 +2204,6 @@ public function testEchoBodyPetResponseStringRequest( $resourcePath = '/echo/body/Pet/response_string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2482,7 +2473,6 @@ public function testEchoBodyStringEnumRequest( $resourcePath = '/echo/body/string_enum'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2752,7 +2742,6 @@ public function testEchoBodyTagResponseStringRequest( $resourcePath = '/echo/body/Tag/response_string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php index a8fabb30a8d2..d67355d7ec11 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/FormApi.php @@ -352,7 +352,6 @@ public function testFormIntegerBooleanStringRequest( $resourcePath = '/form/integer/boolean/string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -632,7 +631,6 @@ public function testFormObjectMultipartRequest( $resourcePath = '/form/object/multipart'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -954,7 +952,6 @@ public function testFormOneofRequest( $resourcePath = '/form/oneof'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php index 285043fa661c..56a13c1ef738 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php @@ -365,8 +365,6 @@ public function testHeaderIntegerBooleanStringEnumsRequest( { $resourcePath = '/header/integer/boolean/string/enums'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php index a3cf94826000..89dbdf31621c 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/PathApi.php @@ -379,8 +379,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE } $resourcePath = '/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php index ceffaa05d82a..7d9841365462 100644 --- a/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php @@ -365,7 +365,6 @@ public function testEnumRefStringRequest( { $resourcePath = '/query/enum_ref_string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -642,7 +641,6 @@ public function testQueryDatetimeDateStringRequest( { $resourcePath = '/query/datetime/date/string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -928,7 +926,6 @@ public function testQueryIntegerBooleanStringRequest( { $resourcePath = '/query/integer/boolean/string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1194,7 +1191,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectRequest( { $resourcePath = '/query/style_deepObject/explode_true/object'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1442,7 +1438,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( { $resourcePath = '/query/style_deepObject/explode_true/object/allOf'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1690,7 +1685,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( { $resourcePath = '/query/style_form/explode_false/array_integer'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1938,7 +1932,6 @@ public function testQueryStyleFormExplodeFalseArrayStringRequest( { $resourcePath = '/query/style_form/explode_false/array_string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2186,7 +2179,6 @@ public function testQueryStyleFormExplodeTrueArrayStringRequest( { $resourcePath = '/query/style_form/explode_true/array_string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2434,7 +2426,6 @@ public function testQueryStyleFormExplodeTrueObjectRequest( { $resourcePath = '/query/style_form/explode_true/object'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2682,7 +2673,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfRequest( { $resourcePath = '/query/style_form/explode_true/object/allOf'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2940,7 +2930,6 @@ public function testQueryStyleJsonSerializationObjectRequest( { $resourcePath = '/query/style_jsonSerialization/object'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; diff --git a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php index 2ba08cea6965..386cac3596eb 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -318,8 +318,6 @@ public function testAuthHttpBasicRequest( { $resourcePath = '/auth/http/basic'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -552,8 +550,6 @@ public function testAuthHttpBearerRequest( { $resourcePath = '/auth/http/bearer'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php index 4842c3685fa7..fb3566f5d8c2 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -342,8 +342,6 @@ public function testBinaryGifRequest( { $resourcePath = '/binary/gif'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -582,7 +580,6 @@ public function testBodyApplicationOctetstreamBinaryRequest( $resourcePath = '/body/application/octetstream/binary'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -858,7 +855,6 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( $resourcePath = '/body/application/octetstream/array_of_binary'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1130,7 +1126,6 @@ public function testBodyMultipartFormdataSingleBinaryRequest( $resourcePath = '/body/application/octetstream/single_binary'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1402,7 +1397,6 @@ public function testEchoBodyAllOfPetRequest( $resourcePath = '/echo/body/allOf/Pet'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1672,7 +1666,6 @@ public function testEchoBodyFreeFormObjectResponseStringRequest( $resourcePath = '/echo/body/FreeFormObject/response_string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1942,7 +1935,6 @@ public function testEchoBodyPetRequest( $resourcePath = '/echo/body/Pet'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2212,7 +2204,6 @@ public function testEchoBodyPetResponseStringRequest( $resourcePath = '/echo/body/Pet/response_string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2482,7 +2473,6 @@ public function testEchoBodyStringEnumRequest( $resourcePath = '/echo/body/string_enum'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2752,7 +2742,6 @@ public function testEchoBodyTagResponseStringRequest( $resourcePath = '/echo/body/Tag/response_string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php index a8fabb30a8d2..d67355d7ec11 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -352,7 +352,6 @@ public function testFormIntegerBooleanStringRequest( $resourcePath = '/form/integer/boolean/string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -632,7 +631,6 @@ public function testFormObjectMultipartRequest( $resourcePath = '/form/object/multipart'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -954,7 +952,6 @@ public function testFormOneofRequest( $resourcePath = '/form/oneof'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php index 285043fa661c..56a13c1ef738 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -365,8 +365,6 @@ public function testHeaderIntegerBooleanStringEnumsRequest( { $resourcePath = '/header/integer/boolean/string/enums'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php index a3cf94826000..89dbdf31621c 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -379,8 +379,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE } $resourcePath = '/path/string/{path_string}/integer/{path_integer}/{enum_nonref_string_path}/{enum_ref_string_path}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php index ceffaa05d82a..7d9841365462 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -365,7 +365,6 @@ public function testEnumRefStringRequest( { $resourcePath = '/query/enum_ref_string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -642,7 +641,6 @@ public function testQueryDatetimeDateStringRequest( { $resourcePath = '/query/datetime/date/string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -928,7 +926,6 @@ public function testQueryIntegerBooleanStringRequest( { $resourcePath = '/query/integer/boolean/string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1194,7 +1191,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectRequest( { $resourcePath = '/query/style_deepObject/explode_true/object'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1442,7 +1438,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( { $resourcePath = '/query/style_deepObject/explode_true/object/allOf'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1690,7 +1685,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( { $resourcePath = '/query/style_form/explode_false/array_integer'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1938,7 +1932,6 @@ public function testQueryStyleFormExplodeFalseArrayStringRequest( { $resourcePath = '/query/style_form/explode_false/array_string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2186,7 +2179,6 @@ public function testQueryStyleFormExplodeTrueArrayStringRequest( { $resourcePath = '/query/style_form/explode_true/array_string'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2434,7 +2426,6 @@ public function testQueryStyleFormExplodeTrueObjectRequest( { $resourcePath = '/query/style_form/explode_true/object'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2682,7 +2673,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfRequest( { $resourcePath = '/query/style_form/explode_true/object/allOf'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -2940,7 +2930,6 @@ public function testQueryStyleJsonSerializationObjectRequest( { $resourcePath = '/query/style_jsonSerialization/object'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php index febc2db820f0..3d15068d1072 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php @@ -331,7 +331,6 @@ public function call123TestSpecialTagsRequest( $resourcePath = '/another-fake/dummy'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php index 7a3b234c8b5a..dc8a52bbf6b1 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php @@ -302,8 +302,6 @@ public function errorRequest( { $resourcePath = '/error'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -523,8 +521,6 @@ public function fooGetRequest( { $resourcePath = '/foo'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php index bab577aa30c6..7db77e146c22 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php @@ -396,8 +396,6 @@ public function fakeBigDecimalMapRequest( { $resourcePath = '/fake/BigDecimalMap'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -618,8 +616,6 @@ public function fakeDeletePetRequest( } $resourcePath = '/fake/pet/{pet_id}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -903,7 +899,6 @@ public function fakeEnumEndpointRequest( } $resourcePath = '/fake/enum/endpoint'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1159,8 +1154,6 @@ public function fakeHealthGetRequest( { $resourcePath = '/fake/health'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1652,7 +1645,6 @@ public function fakeOuterBooleanSerializeRequest( $resourcePath = '/fake/outer/boolean'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1914,7 +1906,6 @@ public function fakeOuterCompositeSerializeRequest( $resourcePath = '/fake/outer/composite'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2176,7 +2167,6 @@ public function fakeOuterNumberSerializeRequest( $resourcePath = '/fake/outer/number'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2438,7 +2428,6 @@ public function fakeOuterStringSerializeRequest( $resourcePath = '/fake/outer/string'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2706,7 +2695,6 @@ public function fakePropertyEnumIntegerSerializeRequest( $resourcePath = '/fake/property/enum-int'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -3014,7 +3002,6 @@ public function fakeWith400And4xxRangeResponseEndpointRequest( $resourcePath = '/fake/with_400_and_4xx_range_response/endpoint'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -3290,7 +3277,6 @@ public function fakeWith400And4xxRangeResponseNo4xxDatatypeEndpointRequest( $resourcePath = '/fake/with_400_and_4xx_range_response_no_4xx_datatype/endpoint'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -3580,7 +3566,6 @@ public function fakeWith400ResponseEndpointRequest( $resourcePath = '/fake/with_400_response/endpoint'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -3874,7 +3859,6 @@ public function fakeWith4xxRangeResponseEndpointRequest( $resourcePath = '/fake/with_4xx_range_response/endpoint'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -4150,7 +4134,6 @@ public function fakeWith4xxRangeResponseNo4xxDatatypeEndpointRequest( $resourcePath = '/fake/with_4xx_range_response_no_4xx_datatype/endpoint'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -4378,7 +4361,6 @@ public function testAdditionalPropertiesReferenceRequest( $resourcePath = '/fake/additionalProperties-reference'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -4598,7 +4580,6 @@ public function testBodyWithBinaryRequest( $resourcePath = '/fake/body-with-binary'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -4818,7 +4799,6 @@ public function testBodyWithFileSchemaRequest( $resourcePath = '/fake/body-with-file-schema'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -5339,7 +5319,6 @@ public function testClientModelRequest( $resourcePath = '/fake'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -5754,7 +5733,6 @@ public function testEndpointParametersRequest( $resourcePath = '/fake'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -6412,7 +6390,6 @@ public function testGroupParametersRequest( } $resourcePath = '/fake'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -6659,7 +6636,6 @@ public function testInlineAdditionalPropertiesRequest( $resourcePath = '/fake/inline-additionalProperties'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -6887,7 +6863,6 @@ public function testInlineFreeformAdditionalPropertiesRequest( $resourcePath = '/fake/inline-freeform-additionalProperties'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -7131,7 +7106,6 @@ public function testJsonFormDataRequest( $resourcePath = '/fake/jsonFormData'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -7362,7 +7336,6 @@ public function testNullableRequest( $resourcePath = '/fake/nullable'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -7671,7 +7644,6 @@ public function testQueryParameterCollectionFormatRequest( } $resourcePath = '/fake/test-query-parameters'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -7932,7 +7904,6 @@ public function testStringMapReferenceRequest( $resourcePath = '/fake/stringMap-reference'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php index 2e31e6e5c9d3..dcb89d4e7393 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php @@ -331,7 +331,6 @@ public function testClassnameRequest( $resourcePath = '/fake_classname_test'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php index c0d6b70fedf4..f9a538ac259c 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php @@ -414,7 +414,6 @@ public function addPetRequest( $resourcePath = '/pet'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -712,8 +711,6 @@ public function deletePetRequest( } $resourcePath = '/pet/{petId}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -974,7 +971,6 @@ public function findPetsByStatusRequest( } $resourcePath = '/pet/findByStatus'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1238,7 +1234,6 @@ public function findPetsByTagsRequest( } $resourcePath = '/pet/findByTags'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1497,8 +1492,6 @@ public function getPetByIdRequest( } $resourcePath = '/pet/{petId}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1814,7 +1807,6 @@ public function updatePetRequest( $resourcePath = '/pet'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2123,7 +2115,6 @@ public function updatePetWithFormRequest( $resourcePath = '/pet/{petId}'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2435,7 +2426,6 @@ public function uploadFileRequest( $resourcePath = '/pet/{petId}/uploadImage'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -2753,7 +2743,6 @@ public function uploadFileWithRequiredFileRequest( $resourcePath = '/fake/{petId}/uploadImageWithRequiredFile'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php index 896dbc1db660..87a8e3ddca03 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php @@ -291,8 +291,6 @@ public function deleteOrderRequest( } $resourcePath = '/store/order/{order_id}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -528,8 +526,6 @@ public function getInventoryRequest( { $resourcePath = '/store/inventory'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -785,8 +781,6 @@ public function getOrderByIdRequest( } $resourcePath = '/store/order/{order_id}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1039,7 +1033,6 @@ public function placeOrderRequest( $resourcePath = '/store/order'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; diff --git a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php index b632df09074a..5af6a2005083 100644 --- a/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php +++ b/samples/client/petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php @@ -304,7 +304,6 @@ public function createUserRequest( $resourcePath = '/user'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -532,7 +531,6 @@ public function createUsersWithArrayInputRequest( $resourcePath = '/user/createWithArray'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -760,7 +758,6 @@ public function createUsersWithListInputRequest( $resourcePath = '/user/createWithList'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -987,8 +984,6 @@ public function deleteUserRequest( } $resourcePath = '/user/{username}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1240,8 +1235,6 @@ public function getUserByNameRequest( } $resourcePath = '/user/{username}'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1509,7 +1502,6 @@ public function loginUserRequest( } $resourcePath = '/user/login'; - $formParams = []; $queryParams = []; $headerParams = []; $httpBody = ''; @@ -1708,8 +1700,6 @@ public function logoutUserRequest( { $resourcePath = '/user/logout'; - $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false; @@ -1922,7 +1912,6 @@ public function updateUserRequest( $resourcePath = '/user/{username}'; $formParams = []; - $queryParams = []; $headerParams = []; $httpBody = ''; $multipart = false;