changed request method from protected to public (#7603)

* changed request method from protected to public

* update samples

Co-authored-by: William Cheng <wing328hk@gmail.com>
This commit is contained in:
Rainer 2020-10-25 10:54:21 +01:00 committed by GitHub
parent f30d6c8399
commit e11a427cf5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 40 additions and 40 deletions

View File

@ -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

View File

@ -297,7 +297,7 @@ class AnotherFakeApi
* @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)) {

View File

@ -288,7 +288,7 @@ class DefaultApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fooGetRequest()
public function fooGetRequest()
{
$resourcePath = '/foo';

View File

@ -292,7 +292,7 @@ class FakeApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fakeHealthGetRequest()
public function fakeHealthGetRequest()
{
$resourcePath = '/fake/health';
@ -507,7 +507,7 @@ class FakeApi
* @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)) {
@ -783,7 +783,7 @@ class FakeApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fakeOuterBooleanSerializeRequest($body = null)
public function fakeOuterBooleanSerializeRequest($body = null)
{
$resourcePath = '/fake/outer/boolean';
@ -1038,7 +1038,7 @@ class FakeApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fakeOuterCompositeSerializeRequest($outer_composite = null)
public function fakeOuterCompositeSerializeRequest($outer_composite = null)
{
$resourcePath = '/fake/outer/composite';
@ -1293,7 +1293,7 @@ class FakeApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fakeOuterNumberSerializeRequest($body = null)
public function fakeOuterNumberSerializeRequest($body = null)
{
$resourcePath = '/fake/outer/number';
@ -1548,7 +1548,7 @@ class FakeApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function fakeOuterStringSerializeRequest($body = null)
public function fakeOuterStringSerializeRequest($body = null)
{
$resourcePath = '/fake/outer/string';
@ -1755,7 +1755,7 @@ class FakeApi
* @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)) {
@ -1973,7 +1973,7 @@ class FakeApi
* @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)) {
@ -2255,7 +2255,7 @@ class FakeApi
* @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)) {
@ -2537,7 +2537,7 @@ class FakeApi
* @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)) {
@ -2916,7 +2916,7 @@ class FakeApi
* @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';
@ -3219,7 +3219,7 @@ class FakeApi
* @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;
@ -3506,7 +3506,7 @@ class FakeApi
* @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)) {
@ -3728,7 +3728,7 @@ class FakeApi
* @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)) {
@ -3969,7 +3969,7 @@ class FakeApi
* @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)) {

View File

@ -297,7 +297,7 @@ class FakeClassnameTags123Api
* @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)) {

View File

@ -269,7 +269,7 @@ class PetApi
* @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)) {
@ -501,7 +501,7 @@ class PetApi
* @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)) {
@ -776,7 +776,7 @@ class PetApi
* @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)) {
@ -1046,7 +1046,7 @@ class PetApi
* @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)) {
@ -1316,7 +1316,7 @@ class PetApi
* @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)) {
@ -1560,7 +1560,7 @@ class PetApi
* @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)) {
@ -1797,7 +1797,7 @@ class PetApi
* @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)) {
@ -2086,7 +2086,7 @@ class PetApi
* @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)) {
@ -2383,7 +2383,7 @@ class PetApi
* @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)) {

View File

@ -249,7 +249,7 @@ class StoreApi
* @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)) {
@ -511,7 +511,7 @@ class StoreApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function getInventoryRequest()
public function getInventoryRequest()
{
$resourcePath = '/store/inventory';
@ -769,7 +769,7 @@ class StoreApi
* @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)) {
@ -1043,7 +1043,7 @@ class StoreApi
* @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)) {

View File

@ -249,7 +249,7 @@ class UserApi
* @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)) {
@ -466,7 +466,7 @@ class UserApi
* @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)) {
@ -683,7 +683,7 @@ class UserApi
* @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)) {
@ -900,7 +900,7 @@ class UserApi
* @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)) {
@ -1167,7 +1167,7 @@ class UserApi
* @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)) {
@ -1439,7 +1439,7 @@ class UserApi
* @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)) {
@ -1673,7 +1673,7 @@ class UserApi
* @throws \InvalidArgumentException
* @return \GuzzleHttp\Psr7\Request
*/
protected function logoutUserRequest()
public function logoutUserRequest()
{
$resourcePath = '/user/logout';
@ -1883,7 +1883,7 @@ class UserApi
* @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)) {