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 2d9597cc9db7..e08efd963782 100644 --- a/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache +++ b/modules/openapi-generator/src/main/resources/php-nextgen/api.mustache @@ -786,11 +786,14 @@ use {{invokerPackage}}\ObjectSerializer; {{#authMethods}} {{#isApiKey}} + {{^isKeyInCookie}} // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('{{keyParamName}}'); if ($apiKey !== null) { {{#isKeyInHeader}}$headers['{{keyParamName}}'] = $apiKey;{{/isKeyInHeader}}{{#isKeyInQuery}}$queryParams['{{keyParamName}}'] = $apiKey;{{/isKeyInQuery}} } + + {{/isKeyInCookie}} {{/isApiKey}} {{#isBasic}} {{#isBasicBasic}} @@ -798,12 +801,14 @@ use {{invokerPackage}}\ObjectSerializer; if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) { $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword()); } + {{/isBasicBasic}} {{#isBasicBearer}} // this endpoint requires Bearer{{#bearerFormat}} ({{{.}}}){{/bearerFormat}} authentication (access token) if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } + {{/isBasicBearer}} {{/isBasic}} {{#isOAuth}} @@ -811,9 +816,9 @@ use {{invokerPackage}}\ObjectSerializer; if (!empty($this->config->getAccessToken())) { $headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken(); } + {{/isOAuth}} {{/authMethods}} - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); diff --git a/modules/openapi-generator/src/main/resources/php/api.mustache b/modules/openapi-generator/src/main/resources/php/api.mustache index 8a5e230846c0..8c3377c45c17 100644 --- a/modules/openapi-generator/src/main/resources/php/api.mustache +++ b/modules/openapi-generator/src/main/resources/php/api.mustache @@ -711,11 +711,13 @@ use {{invokerPackage}}\ObjectSerializer; {{#authMethods}} {{#isApiKey}} + {{^isKeyInCookie}} // this endpoint requires API key authentication $apiKey = $this->config->getApiKeyWithPrefix('{{keyParamName}}'); if ($apiKey !== null) { {{#isKeyInHeader}}$headers['{{keyParamName}}'] = $apiKey;{{/isKeyInHeader}}{{#isKeyInQuery}}$queryParams['{{keyParamName}}'] = $apiKey;{{/isKeyInQuery}} } + {{/isKeyInCookie}} {{/isApiKey}} {{#isBasic}} {{#isBasicBasic}} 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 a0f0e243898f..7a768aa0a37d 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 @@ -386,7 +386,6 @@ public function testBinaryGifRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -659,7 +658,6 @@ public function testBodyApplicationOctetstreamBinaryRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -940,7 +938,6 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1215,7 +1212,6 @@ public function testBodyMultipartFormdataSingleBinaryRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1488,7 +1484,6 @@ public function testEchoBodyAllOfPetRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1761,7 +1756,6 @@ public function testEchoBodyFreeFormObjectResponseStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2034,7 +2028,6 @@ public function testEchoBodyPetRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2307,7 +2300,6 @@ public function testEchoBodyPetResponseStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2580,7 +2572,6 @@ public function testEchoBodyStringEnumRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2853,7 +2844,6 @@ public function testEchoBodyTagResponseStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); 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 fce39825f508..b70c3fa4761c 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 @@ -409,7 +409,6 @@ public function testFormIntegerBooleanStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -690,7 +689,6 @@ public function testFormObjectMultipartRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1025,7 +1023,6 @@ public function testFormOneofRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 a910257bdd00..bfd5cb323151 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 @@ -434,7 +434,6 @@ public function testHeaderIntegerBooleanStringEnumsRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 b2e00cdd6c8c..b659f5ceee77 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 @@ -459,7 +459,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 8bba34f7cd86..2872766a866d 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 @@ -429,7 +429,6 @@ public function testEnumRefStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -744,7 +743,6 @@ public function testQueryDatetimeDateStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1059,7 +1057,6 @@ public function testQueryIntegerBooleanStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1334,7 +1331,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1609,7 +1605,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1884,7 +1879,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2159,7 +2153,6 @@ public function testQueryStyleFormExplodeFalseArrayStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2434,7 +2427,6 @@ public function testQueryStyleFormExplodeTrueArrayStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2709,7 +2701,6 @@ public function testQueryStyleFormExplodeTrueObjectRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2984,7 +2975,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -3279,7 +3269,6 @@ public function testQueryStyleJsonSerializationObjectRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); 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 5bb165efe431..6cff3ea83996 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/BodyApi.php @@ -386,7 +386,6 @@ public function testBinaryGifRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -659,7 +658,6 @@ public function testBodyApplicationOctetstreamBinaryRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -940,7 +938,6 @@ public function testBodyMultipartFormdataArrayOfBinaryRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1215,7 +1212,6 @@ public function testBodyMultipartFormdataSingleBinaryRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1488,7 +1484,6 @@ public function testEchoBodyAllOfPetRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1761,7 +1756,6 @@ public function testEchoBodyFreeFormObjectResponseStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2034,7 +2028,6 @@ public function testEchoBodyPetRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2307,7 +2300,6 @@ public function testEchoBodyPetResponseStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2580,7 +2572,6 @@ public function testEchoBodyStringEnumRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2853,7 +2844,6 @@ public function testEchoBodyTagResponseStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); 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 fce39825f508..b70c3fa4761c 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/FormApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/FormApi.php @@ -409,7 +409,6 @@ public function testFormIntegerBooleanStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -690,7 +689,6 @@ public function testFormObjectMultipartRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1025,7 +1023,6 @@ public function testFormOneofRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 a910257bdd00..bfd5cb323151 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/HeaderApi.php @@ -434,7 +434,6 @@ public function testHeaderIntegerBooleanStringEnumsRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 b2e00cdd6c8c..b659f5ceee77 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/PathApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/PathApi.php @@ -459,7 +459,6 @@ public function testsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathE } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 8bba34f7cd86..2872766a866d 100644 --- a/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php +++ b/samples/client/echo_api/php-nextgen/src/Api/QueryApi.php @@ -429,7 +429,6 @@ public function testEnumRefStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -744,7 +743,6 @@ public function testQueryDatetimeDateStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1059,7 +1057,6 @@ public function testQueryIntegerBooleanStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1334,7 +1331,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1609,7 +1605,6 @@ public function testQueryStyleDeepObjectExplodeTrueObjectAllOfRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1884,7 +1879,6 @@ public function testQueryStyleFormExplodeFalseArrayIntegerRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2159,7 +2153,6 @@ public function testQueryStyleFormExplodeFalseArrayStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2434,7 +2427,6 @@ public function testQueryStyleFormExplodeTrueArrayStringRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2709,7 +2701,6 @@ public function testQueryStyleFormExplodeTrueObjectRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2984,7 +2975,6 @@ public function testQueryStyleFormExplodeTrueObjectAllOfRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -3279,7 +3269,6 @@ public function testQueryStyleJsonSerializationObjectRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); 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 8bfb9886de2b..52380e2cd5d8 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 @@ -382,7 +382,6 @@ public function call123TestSpecialTagsRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 04c32e9b93dd..8e0d32d1bf65 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 @@ -346,7 +346,6 @@ public function errorRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -593,7 +592,6 @@ public function fooGetRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 05d08dfd0e76..9208c30b80d8 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 @@ -440,7 +440,6 @@ public function fakeBigDecimalMapRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -697,7 +696,6 @@ public function fakeDeletePetRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1030,7 +1028,6 @@ public function fakeEnumEndpointRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1285,7 +1282,6 @@ public function fakeHealthGetRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1551,7 +1547,6 @@ public function fakeHttpSignatureTestRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1816,7 +1811,6 @@ public function fakeOuterBooleanSerializeRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2081,7 +2075,6 @@ public function fakeOuterCompositeSerializeRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2346,7 +2339,6 @@ public function fakeOuterNumberSerializeRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2611,7 +2603,6 @@ public function fakeOuterStringSerializeRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2882,7 +2873,6 @@ public function fakePropertyEnumIntegerSerializeRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -3193,7 +3183,6 @@ public function fakeWith400And4xxRangeResponseEndpointRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -3472,7 +3461,6 @@ public function fakeWith400And4xxRangeResponseNo4xxDatatypeEndpointRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -3765,7 +3753,6 @@ public function fakeWith400ResponseEndpointRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -4062,7 +4049,6 @@ public function fakeWith4xxRangeResponseEndpointRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -4341,7 +4327,6 @@ public function fakeWith4xxRangeResponseNo4xxDatatypeEndpointRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -4572,7 +4557,6 @@ public function testAdditionalPropertiesReferenceRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -4795,7 +4779,6 @@ public function testBodyWithBinaryRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -5018,7 +5001,6 @@ public function testBodyWithFileSchemaRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -5267,7 +5249,6 @@ public function testBodyWithQueryParamsRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -5546,7 +5527,6 @@ public function testClientModelRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -6368,7 +6348,6 @@ public function testEnumParametersRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -6926,7 +6905,6 @@ public function testInlineAdditionalPropertiesRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -7157,7 +7135,6 @@ public function testInlineFreeformAdditionalPropertiesRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -7408,7 +7385,6 @@ public function testJsonFormDataRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -7639,7 +7615,6 @@ public function testNullableRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -8014,7 +7989,6 @@ public function testQueryParameterCollectionFormatRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -8245,7 +8219,6 @@ public function testStringMapReferenceRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); 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 a3ac3cca2771..88ef8b52689c 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 @@ -344,7 +344,6 @@ public function deleteOrderRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -890,7 +889,6 @@ public function getOrderByIdRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1169,7 +1167,6 @@ public function placeOrderRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $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 0483a7812be2..eec92679379b 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 @@ -355,7 +355,6 @@ public function createUserRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -586,7 +585,6 @@ public function createUsersWithArrayInputRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -817,7 +815,6 @@ public function createUsersWithListInputRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1049,7 +1046,6 @@ public function deleteUserRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1329,7 +1325,6 @@ public function getUserByNameRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1636,7 +1631,6 @@ public function loginUserRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -1843,7 +1837,6 @@ public function logoutUserRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); @@ -2099,7 +2092,6 @@ public function updateUserRequest( } } - $defaultHeaders = []; if ($this->config->getUserAgent()) { $defaultHeaders['User-Agent'] = $this->config->getUserAgent();