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..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}} @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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..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', @@ -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(