From b7f8a4428daf1aa544d652d553dd772b7bb02738 Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 10:14:45 +0200 Subject: [PATCH 1/2] [php-nextgen] Remove whitespace --- .../src/main/resources/php-nextgen/api.mustache | 11 +++++++++-- .../php-nextgen-streaming/src/Api/AuthApi.php | 2 -- .../php-nextgen-streaming/src/Api/BodyApi.php | 10 ---------- .../php-nextgen-streaming/src/Api/FormApi.php | 3 --- .../php-nextgen-streaming/src/Api/HeaderApi.php | 1 - .../php-nextgen-streaming/src/Api/PathApi.php | 1 - .../php-nextgen-streaming/src/Api/QueryApi.php | 11 ----------- .../echo_api/php-nextgen/src/Api/AuthApi.php | 2 -- .../echo_api/php-nextgen/src/Api/BodyApi.php | 10 ---------- .../echo_api/php-nextgen/src/Api/FormApi.php | 3 --- .../echo_api/php-nextgen/src/Api/HeaderApi.php | 1 - .../echo_api/php-nextgen/src/Api/PathApi.php | 1 - .../echo_api/php-nextgen/src/Api/QueryApi.php | 11 ----------- .../OpenAPIClient-php/src/Api/AnotherFakeApi.php | 1 - .../OpenAPIClient-php/src/Api/DefaultApi.php | 1 - .../OpenAPIClient-php/src/Api/FakeApi.php | 14 -------------- .../src/Api/FakeClassnameTags123Api.php | 1 - .../OpenAPIClient-php/src/Api/PetApi.php | 5 ----- .../OpenAPIClient-php/src/Api/StoreApi.php | 3 --- .../OpenAPIClient-php/src/Api/UserApi.php | 2 -- 20 files changed, 9 insertions(+), 85 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 a16f59353e01..28dadd663ba4 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -307,14 +307,21 @@ use {{invokerPackage}}\ObjectSerializer; } {{/-last}} {{/responses}} - {{#responses}}{{#dataType}}{{#isRange}}{{^isWildcard}} + {{#responses}} + {{#dataType}} + {{#isRange}} + {{^isWildcard}} if ($this->responseWithinRangeCode('{{code}}', $statusCode)) { return $this->handleResponseWithDataType( '{{{dataType}}}', $request, $response, ); - }{{/isWildcard}}{{/isRange}}{{/dataType}}{{/responses}} + } + {{/isWildcard}} + {{/isRange}} + {{/dataType}} + {{/responses}} if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..cf2ed3ac0682 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 @@ -195,7 +195,6 @@ public function testAuthHttpBasicWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -454,7 +453,6 @@ public function testAuthHttpBearerWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..7bc025cb5199 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 @@ -219,7 +219,6 @@ public function testBinaryGifWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -477,7 +476,6 @@ public function testBodyApplicationOctetstreamBinaryWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -749,7 +747,6 @@ public function testBodyMultipartFormdataArrayOfBinaryWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1029,7 +1026,6 @@ public function testBodyMultipartFormdataSingleBinaryWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1303,7 +1299,6 @@ public function testEchoBodyAllOfPetWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1575,7 +1570,6 @@ public function testEchoBodyFreeFormObjectResponseStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1847,7 +1841,6 @@ public function testEchoBodyPetWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2119,7 +2112,6 @@ public function testEchoBodyPetResponseStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2391,7 +2383,6 @@ public function testEchoBodyStringEnumWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2663,7 +2654,6 @@ public function testEchoBodyTagResponseStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..928ab2ab5b0a 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 @@ -210,7 +210,6 @@ public function testFormIntegerBooleanStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -500,7 +499,6 @@ public function testFormObjectMultipartWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -800,7 +798,6 @@ public function testFormOneofWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..82641e217baa 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 @@ -212,7 +212,6 @@ public function testHeaderIntegerBooleanStringEnumsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..930bd9bf642f 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 @@ -208,7 +208,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..d7373841344b 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 @@ -230,7 +230,6 @@ public function testEnumRefStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -528,7 +527,6 @@ public function testQueryDatetimeDateStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -842,7 +840,6 @@ public function testQueryIntegerBooleanStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1148,7 +1145,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1422,7 +1418,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1696,7 +1691,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1970,7 +1964,6 @@ public function testQueryStyleFormExplodeFalseArrayStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2244,7 +2237,6 @@ public function testQueryStyleFormExplodeTrueArrayStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2518,7 +2510,6 @@ public function testQueryStyleFormExplodeTrueObjectWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2792,7 +2783,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3070,7 +3060,6 @@ public function testQueryStyleJsonSerializationObjectWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..cf2ed3ac0682 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -195,7 +195,6 @@ public function testAuthHttpBasicWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -454,7 +453,6 @@ public function testAuthHttpBearerWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..9cea206c35de 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -219,7 +219,6 @@ public function testBinaryGifWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -477,7 +476,6 @@ public function testBodyApplicationOctetstreamBinaryWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -749,7 +747,6 @@ public function testBodyMultipartFormdataArrayOfBinaryWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1029,7 +1026,6 @@ public function testBodyMultipartFormdataSingleBinaryWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1303,7 +1299,6 @@ public function testEchoBodyAllOfPetWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1575,7 +1570,6 @@ public function testEchoBodyFreeFormObjectResponseStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1847,7 +1841,6 @@ public function testEchoBodyPetWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2119,7 +2112,6 @@ public function testEchoBodyPetResponseStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2391,7 +2383,6 @@ public function testEchoBodyStringEnumWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2663,7 +2654,6 @@ public function testEchoBodyTagResponseStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..928ab2ab5b0a 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -210,7 +210,6 @@ public function testFormIntegerBooleanStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -500,7 +499,6 @@ public function testFormObjectMultipartWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -800,7 +798,6 @@ public function testFormOneofWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..82641e217baa 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -212,7 +212,6 @@ public function testHeaderIntegerBooleanStringEnumsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..930bd9bf642f 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -208,7 +208,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..d7373841344b 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -230,7 +230,6 @@ public function testEnumRefStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -528,7 +527,6 @@ public function testQueryDatetimeDateStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -842,7 +840,6 @@ public function testQueryIntegerBooleanStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1148,7 +1145,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1422,7 +1418,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1696,7 +1691,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1970,7 +1964,6 @@ public function testQueryStyleFormExplodeFalseArrayStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2244,7 +2237,6 @@ public function testQueryStyleFormExplodeTrueArrayStringWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2518,7 +2510,6 @@ public function testQueryStyleFormExplodeTrueObjectWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2792,7 +2783,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3070,7 +3060,6 @@ public function testQueryStyleJsonSerializationObjectWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..34f597829d5c 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 @@ -195,7 +195,6 @@ public function call123TestSpecialTagsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..4b1cd6bb94b1 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 @@ -429,7 +429,6 @@ public function fooGetWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..4ab13b86c0de 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 @@ -277,7 +277,6 @@ public function fakeBigDecimalMapWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -795,7 +794,6 @@ public function fakeEnumEndpointWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1115,7 +1113,6 @@ public function fakeHealthGetWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1634,7 +1631,6 @@ public function fakeOuterBooleanSerializeWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1898,7 +1894,6 @@ public function fakeOuterCompositeSerializeWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2162,7 +2157,6 @@ public function fakeOuterNumberSerializeWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2426,7 +2420,6 @@ public function fakeOuterStringSerializeWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2690,7 +2683,6 @@ public function fakePropertyEnumIntegerSerializeWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2971,7 +2963,6 @@ public function fakeWith400And4xxRangeResponseEndpointWithHttpInfo( ); } - if ($this->responseWithinRangeCode('4xx', $statusCode)) { return $this->handleResponseWithDataType( '\OpenAPI\Client\Model\ErrorResponse', @@ -3274,7 +3265,6 @@ public function fakeWith400And4xxRangeResponseNo4xxDatatypeEndpointWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3558,7 +3548,6 @@ public function fakeWith400ResponseEndpointWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -3845,7 +3834,6 @@ public function fakeWith4xxRangeResponseEndpointWithHttpInfo( ); } - if ($this->responseWithinRangeCode('4xx', $statusCode)) { return $this->handleResponseWithDataType( '\OpenAPI\Client\Model\ErrorResponse', @@ -4140,7 +4128,6 @@ public function fakeWith4xxRangeResponseNo4xxDatatypeEndpointWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -5340,7 +5327,6 @@ public function testClientModelWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..556ca715513a 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 @@ -195,7 +195,6 @@ public function testClassnameWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..a4936117586a 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 @@ -868,7 +868,6 @@ public function findPetsByStatusWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1155,7 +1154,6 @@ public function findPetsByTagsWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1443,7 +1441,6 @@ public function getPetByIdWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2400,7 +2397,6 @@ public function uploadFileWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -2716,7 +2712,6 @@ public function uploadFileWithRequiredFileWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..9543f1db45dd 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 @@ -431,7 +431,6 @@ public function getInventoryWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -695,7 +694,6 @@ public function getOrderByIdWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -980,7 +978,6 @@ public function placeOrderWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( 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..b135173fa701 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 @@ -1137,7 +1137,6 @@ public function getUserByNameWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( @@ -1420,7 +1419,6 @@ public function loginUserWithHttpInfo( $response, ); } - if ($statusCode < 200 || $statusCode > 299) { throw new ApiException( From d78cd9c5b3842ecec12c8e39df56e479ed80f57d Mon Sep 17 00:00:00 2001 From: coffeemakr <5737978+coffeemakr@users.noreply.github.com> Date: Wed, 10 Jun 2026 10:46:11 +0200 Subject: [PATCH 2/2] [php-nextgen]: Fix content types type --- .../src/main/resources/php-nextgen/api.mustache | 2 +- .../client/echo_api/php-nextgen-streaming/src/Api/AuthApi.php | 2 +- .../client/echo_api/php-nextgen-streaming/src/Api/BodyApi.php | 2 +- .../client/echo_api/php-nextgen-streaming/src/Api/FormApi.php | 2 +- .../client/echo_api/php-nextgen-streaming/src/Api/HeaderApi.php | 2 +- .../client/echo_api/php-nextgen-streaming/src/Api/PathApi.php | 2 +- .../client/echo_api/php-nextgen-streaming/src/Api/QueryApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/AuthApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/BodyApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/FormApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/PathApi.php | 2 +- samples/client/echo_api/php-nextgen/src/Api/QueryApi.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Api/AnotherFakeApi.php | 2 +- .../php-nextgen/OpenAPIClient-php/src/Api/DefaultApi.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Api/FakeApi.php | 2 +- .../OpenAPIClient-php/src/Api/FakeClassnameTags123Api.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Api/PetApi.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Api/StoreApi.php | 2 +- .../petstore/php-nextgen/OpenAPIClient-php/src/Api/UserApi.php | 2 +- 20 files changed, 20 insertions(+), 20 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 28dadd663ba4..f81d2933b3a5 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -64,7 +64,7 @@ use {{invokerPackage}}\ObjectSerializer; */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [{{#operation}} '{{{operationId}}}' => [{{#consumes}} '{{{mediaType}}}',{{/consumes}} 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 cf2ed3ac0682..9bd13a3f2b60 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 @@ -73,7 +73,7 @@ class AuthApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testAuthHttpBasic' => [ 'application/json', 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 7bc025cb5199..2074c0f8b7b9 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 @@ -73,7 +73,7 @@ class BodyApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testBinaryGif' => [ 'application/json', 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 928ab2ab5b0a..858a78cc4f21 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 @@ -73,7 +73,7 @@ class FormApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testFormIntegerBooleanString' => [ 'application/x-www-form-urlencoded', 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 82641e217baa..c4249a1a298d 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 @@ -73,7 +73,7 @@ class HeaderApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testHeaderIntegerBooleanStringEnums' => [ 'application/json', 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 930bd9bf642f..75694f84f694 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 @@ -73,7 +73,7 @@ class PathApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath' => [ 'application/json', 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 d7373841344b..d8c1caffc455 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 @@ -73,7 +73,7 @@ class QueryApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testEnumRefString' => [ 'application/json', 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 cf2ed3ac0682..9bd13a3f2b60 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/AuthApi.php @@ -73,7 +73,7 @@ class AuthApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testAuthHttpBasic' => [ 'application/json', 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 9cea206c35de..0fa6831300e8 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -73,7 +73,7 @@ class BodyApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testBinaryGif' => [ 'application/json', 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 928ab2ab5b0a..858a78cc4f21 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -73,7 +73,7 @@ class FormApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testFormIntegerBooleanString' => [ 'application/x-www-form-urlencoded', 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 82641e217baa..c4249a1a298d 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -73,7 +73,7 @@ class HeaderApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testHeaderIntegerBooleanStringEnums' => [ 'application/json', 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 930bd9bf642f..75694f84f694 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -73,7 +73,7 @@ class PathApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath' => [ 'application/json', 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 d7373841344b..d8c1caffc455 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -73,7 +73,7 @@ class QueryApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testEnumRefString' => [ 'application/json', 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 34f597829d5c..2fda5174fef4 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 @@ -72,7 +72,7 @@ class AnotherFakeApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'call123TestSpecialTags' => [ 'application/json', 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 4b1cd6bb94b1..919b3c5d5c24 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 @@ -72,7 +72,7 @@ class DefaultApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'error' => [ 'application/json', 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 4ab13b86c0de..c4c1c9fa8442 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 @@ -72,7 +72,7 @@ class FakeApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'fakeBigDecimalMap' => [ 'application/json', 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 556ca715513a..0c3922906225 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 @@ -72,7 +72,7 @@ class FakeClassnameTags123Api */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'testClassname' => [ 'application/json', 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 a4936117586a..305e01a65597 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 @@ -72,7 +72,7 @@ class PetApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'addPet' => [ 'application/json', 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 9543f1db45dd..0ecc8bd859c8 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 @@ -72,7 +72,7 @@ class StoreApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'deleteOrder' => [ 'application/json', 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 b135173fa701..53fb9ec78cf8 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 @@ -72,7 +72,7 @@ class UserApi */ protected int $hostIndex; - /** @var string[] $contentTypes **/ + /** @var array $contentTypes **/ public const contentTypes = [ 'createUser' => [ 'application/json',