Skip to content

Changed request method from protected to public #7603

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 25, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ function ($exception) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fooGetRequest()
public function fooGetRequest()
{

$resourcePath = '/foo';
Expand Down
30 changes: 15 additions & 15 deletions samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ function ($exception) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fakeHealthGetRequest()
public function fakeHealthGetRequest()
{

$resourcePath = '/fake/health';
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down
18 changes: 9 additions & 9 deletions samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -520,7 +520,7 @@ function ($exception) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getInventoryRequest()
public function getInventoryRequest()
{

$resourcePath = '/store/inventory';
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -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)) {
Expand Down Expand Up @@ -1718,7 +1718,7 @@ function ($exception) {
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function logoutUserRequest()
public function logoutUserRequest()
{

$resourcePath = '/user/logout';
Expand Down Expand Up @@ -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)) {
Expand Down