diff --git a/modules/openapi-generator/src/main/resources/php/api.mustache b/modules/openapi-generator/src/main/resources/php/api.mustache index a80d08486bda..421984d0209c 100644 --- a/modules/openapi-generator/src/main/resources/php/api.mustache +++ b/modules/openapi-generator/src/main/resources/php/api.mustache @@ -406,7 +406,7 @@ use {{invokerPackage}}\ObjectSerializer; * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) + public function {{operationId}}Request({{^vendorExtensions.x-group-parameters}}{{#allParams}}${{paramName}}{{^required}} = {{#defaultValue}}{{{.}}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{/required}}{{#hasMore}}, {{/hasMore}}{{/allParams}}{{/vendorExtensions.x-group-parameters}}{{#vendorExtensions.x-group-parameters}}$associative_array{{/vendorExtensions.x-group-parameters}}) { {{#vendorExtensions.x-group-parameters}} // unbox the parameters from the associative array diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php index b328c2627c4e..bb0ed8fb0b4a 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php @@ -297,7 +297,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function call123TestSpecialTagsRequest($client) + public function call123TestSpecialTagsRequest($client) { // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php index 00c5f27ccee4..ca4f3e85ddd3 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php @@ -288,7 +288,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function fooGetRequest() + public function fooGetRequest() { $resourcePath = '/foo'; diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php index 0b99c8e9aab3..be0f5ea51550 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php @@ -292,7 +292,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function fakeHealthGetRequest() + public function fakeHealthGetRequest() { $resourcePath = '/fake/health'; @@ -516,7 +516,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function fakeHttpSignatureTestRequest($pet, $query_1 = null, $header_1 = null) + public function fakeHttpSignatureTestRequest($pet, $query_1 = null, $header_1 = null) { // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { @@ -798,7 +798,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function fakeOuterBooleanSerializeRequest($body = null) + public function fakeOuterBooleanSerializeRequest($body = null) { $resourcePath = '/fake/outer/boolean'; @@ -1059,7 +1059,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function fakeOuterCompositeSerializeRequest($outer_composite = null) + public function fakeOuterCompositeSerializeRequest($outer_composite = null) { $resourcePath = '/fake/outer/composite'; @@ -1320,7 +1320,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function fakeOuterNumberSerializeRequest($body = null) + public function fakeOuterNumberSerializeRequest($body = null) { $resourcePath = '/fake/outer/number'; @@ -1581,7 +1581,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function fakeOuterStringSerializeRequest($body = null) + public function fakeOuterStringSerializeRequest($body = null) { $resourcePath = '/fake/outer/string'; @@ -1794,7 +1794,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testBodyWithFileSchemaRequest($file_schema_test_class) + public function testBodyWithFileSchemaRequest($file_schema_test_class) { // 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)) { @@ -2018,7 +2018,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testBodyWithQueryParamsRequest($query, $user) + public function testBodyWithQueryParamsRequest($query, $user) { // verify the required parameter 'query' is set if ($query === null || (is_array($query) && count($query) === 0)) { @@ -2306,7 +2306,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testClientModelRequest($client) + public function testClientModelRequest($client) { // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { @@ -2594,7 +2594,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testEndpointParametersRequest($number, $double, $pattern_without_delimiter, $byte, $integer = null, $int32 = null, $int64 = null, $float = null, $string = null, $binary = null, $date = null, $date_time = null, $password = null, $callback = null) + public function testEndpointParametersRequest($number, $double, $pattern_without_delimiter, $byte, $integer = null, $int32 = null, $int64 = null, $float = null, $string = null, $binary = null, $date = null, $date_time = null, $password = null, $callback = null) { // verify the required parameter 'number' is set if ($number === null || (is_array($number) && count($number) === 0)) { @@ -2982,7 +2982,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testEnumParametersRequest($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_form_string_array = '$', $enum_form_string = '-efg') + public function testEnumParametersRequest($enum_header_string_array = null, $enum_header_string = '-efg', $enum_query_string_array = null, $enum_query_string = '-efg', $enum_query_integer = null, $enum_query_double = null, $enum_form_string_array = '$', $enum_form_string = '-efg') { $resourcePath = '/fake'; @@ -3294,7 +3294,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testGroupParametersRequest($associative_array) + public function testGroupParametersRequest($associative_array) { // unbox the parameters from the associative array $required_string_group = array_key_exists('required_string_group', $associative_array) ? $associative_array['required_string_group'] : null; @@ -3590,7 +3590,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testInlineAdditionalPropertiesRequest($request_body) + public function testInlineAdditionalPropertiesRequest($request_body) { // verify the required parameter 'request_body' is set if ($request_body === null || (is_array($request_body) && count($request_body) === 0)) { @@ -3818,7 +3818,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testJsonFormDataRequest($param, $param2) + public function testJsonFormDataRequest($param, $param2) { // verify the required parameter 'param' is set if ($param === null || (is_array($param) && count($param) === 0)) { @@ -4068,7 +4068,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testQueryParameterCollectionFormatRequest($pipe, $ioutil, $http, $url, $context) + public function testQueryParameterCollectionFormatRequest($pipe, $ioutil, $http, $url, $context) { // verify the required parameter 'pipe' is set if ($pipe === null || (is_array($pipe) && count($pipe) === 0)) { diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php index 094e5e914983..210a42b82e2f 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php @@ -297,7 +297,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function testClassnameRequest($client) + public function testClassnameRequest($client) { // verify the required parameter 'client' is set if ($client === null || (is_array($client) && count($client) === 0)) { diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php index e92065f162b2..5e6afd88b56b 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php @@ -269,7 +269,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function addPetRequest($pet) + public function addPetRequest($pet) { // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { @@ -507,7 +507,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deletePetRequest($pet_id, $api_key = null) + public function deletePetRequest($pet_id, $api_key = null) { // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { @@ -791,7 +791,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function findPetsByStatusRequest($status) + public function findPetsByStatusRequest($status) { // verify the required parameter 'status' is set if ($status === null || (is_array($status) && count($status) === 0)) { @@ -1070,7 +1070,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function findPetsByTagsRequest($tags) + public function findPetsByTagsRequest($tags) { // verify the required parameter 'tags' is set if ($tags === null || (is_array($tags) && count($tags) === 0)) { @@ -1349,7 +1349,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getPetByIdRequest($pet_id) + public function getPetByIdRequest($pet_id) { // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { @@ -1602,7 +1602,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updatePetRequest($pet) + public function updatePetRequest($pet) { // verify the required parameter 'pet' is set if ($pet === null || (is_array($pet) && count($pet) === 0)) { @@ -1845,7 +1845,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updatePetWithFormRequest($pet_id, $name = null, $status = null) + public function updatePetWithFormRequest($pet_id, $name = null, $status = null) { // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { @@ -2143,7 +2143,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function uploadFileRequest($pet_id, $additional_metadata = null, $file = null) + public function uploadFileRequest($pet_id, $additional_metadata = null, $file = null) { // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { @@ -2449,7 +2449,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata = null) + public function uploadFileWithRequiredFileRequest($pet_id, $required_file, $additional_metadata = null) { // verify the required parameter 'pet_id' is set if ($pet_id === null || (is_array($pet_id) && count($pet_id) === 0)) { diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php index d4e853de9c3c..1f9913c62c8c 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php @@ -249,7 +249,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteOrderRequest($order_id) + public function deleteOrderRequest($order_id) { // verify the required parameter 'order_id' is set if ($order_id === null || (is_array($order_id) && count($order_id) === 0)) { @@ -520,7 +520,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getInventoryRequest() + public function getInventoryRequest() { $resourcePath = '/store/inventory'; @@ -787,7 +787,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getOrderByIdRequest($order_id) + public function getOrderByIdRequest($order_id) { // verify the required parameter 'order_id' is set if ($order_id === null || (is_array($order_id) && count($order_id) === 0)) { @@ -1070,7 +1070,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function placeOrderRequest($order) + public function placeOrderRequest($order) { // verify the required parameter 'order' is set if ($order === null || (is_array($order) && count($order) === 0)) { diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php index 5e26aa165b3b..dd9f9dc21be2 100644 --- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php +++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php @@ -249,7 +249,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createUserRequest($user) + public function createUserRequest($user) { // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { @@ -472,7 +472,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createUsersWithArrayInputRequest($user) + public function createUsersWithArrayInputRequest($user) { // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { @@ -695,7 +695,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function createUsersWithListInputRequest($user) + public function createUsersWithListInputRequest($user) { // verify the required parameter 'user' is set if ($user === null || (is_array($user) && count($user) === 0)) { @@ -918,7 +918,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function deleteUserRequest($username) + public function deleteUserRequest($username) { // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { @@ -1194,7 +1194,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function getUserByNameRequest($username) + public function getUserByNameRequest($username) { // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { @@ -1475,7 +1475,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function loginUserRequest($username, $password) + public function loginUserRequest($username, $password) { // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) { @@ -1718,7 +1718,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function logoutUserRequest() + public function logoutUserRequest() { $resourcePath = '/user/logout'; @@ -1937,7 +1937,7 @@ function ($exception) { * @throws \InvalidArgumentException * @return \GuzzleHttp\Psr7\Request */ - protected function updateUserRequest($username, $user) + public function updateUserRequest($username, $user) { // verify the required parameter 'username' is set if ($username === null || (is_array($username) && count($username) === 0)) {