remove tab with 2 spaces in php api template

This commit is contained in:
William Cheng
2015-03-27 23:11:13 +08:00
parent 1c547e9598
commit 6ab51bcb4e
4 changed files with 308 additions and 308 deletions

View File

@@ -22,25 +22,25 @@
{{#operations}}
class {{classname}} {
function __construct($apiClient) {
$this->apiClient = $apiClient;
}
function __construct($apiClient) {
$this->apiClient = $apiClient;
}
{{#operation}}
/**
* {{{nickname}}}
/**
* {{{nickname}}}
*
* {{{summary}}}
* {{{summary}}}
*
{{#allParams}} * @param {{dataType}} ${{paramName}} {{description}} {{^optional}}(required){{/optional}}{{#optional}}(optional){{/optional}}
{{/allParams}} * @return {{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}void{{/returnType}}
*/
*/
public function {{nickname}}({{#allParams}}${{paramName}}{{#optional}}=null{{/optional}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) {
// parse inputs
$resourcePath = "{{path}}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "{{httpMethod}}";
// parse inputs
$resourcePath = "{{path}}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "{{httpMethod}}";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -49,17 +49,17 @@ class {{classname}} {
{{#queryParams}}// query params
if(${{paramName}} !== null) {
$queryParams['{{baseName}}'] = $this->apiClient->toQueryValue(${{paramName}});
}{{/queryParams}}
$queryParams['{{baseName}}'] = $this->apiClient->toQueryValue(${{paramName}});
}{{/queryParams}}
{{#headerParams}}// header params
if(${{paramName}} !== null) {
$headerParams['{{baseName}}'] = $this->apiClient->toHeaderValue(${{paramName}});
}{{/headerParams}}
$headerParams['{{baseName}}'] = $this->apiClient->toHeaderValue(${{paramName}});
}{{/headerParams}}
{{#pathParams}}// path params
if(${{paramName}} !== null) {
$resourcePath = str_replace("{" . "{{baseName}}" . "}",
$this->apiClient->toPathValue(${{paramName}}), $resourcePath);
}{{/pathParams}}
$resourcePath = str_replace("{" . "{{baseName}}" . "}",
$this->apiClient->toPathValue(${{paramName}}), $resourcePath);
}{{/pathParams}}
{{#formParams}}// form params
if (${{paramName}} !== null) {
$formParams['{{baseName}}'] = {{#isFile}}'@' . {{/isFile}}$this->apiClient->toFormValue(${{paramName}});
@@ -77,10 +77,10 @@ class {{classname}} {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
{{#returnType}}if(! $response) {
return null;

View File

@@ -21,25 +21,25 @@
*/
class PetApi {
function __construct($apiClient) {
$this->apiClient = $apiClient;
}
function __construct($apiClient) {
$this->apiClient = $apiClient;
}
/**
* updatePet
/**
* updatePet
*
* Update an existing pet
* Update an existing pet
*
* @param Pet $body Pet object that needs to be added to the store (required)
* @return void
*/
*/
public function updatePet($body) {
// parse inputs
$resourcePath = "/pet";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "PUT";
// parse inputs
$resourcePath = "/pet";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "PUT";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -63,28 +63,28 @@ class PetApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* addPet
/**
* addPet
*
* Add a new pet to the store
* Add a new pet to the store
*
* @param Pet $body Pet object that needs to be added to the store (required)
* @return void
*/
*/
public function addPet($body) {
// parse inputs
$resourcePath = "/pet";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
// parse inputs
$resourcePath = "/pet";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -108,28 +108,28 @@ class PetApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* findPetsByStatus
/**
* findPetsByStatus
*
* Finds Pets by status
* Finds Pets by status
*
* @param array[string] $status Status values that need to be considered for filter (required)
* @return array[Pet]
*/
*/
public function findPetsByStatus($status) {
// parse inputs
$resourcePath = "/pet/findByStatus";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
// parse inputs
$resourcePath = "/pet/findByStatus";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -138,8 +138,8 @@ class PetApi {
// query params
if($status !== null) {
$queryParams['status'] = $this->apiClient->toQueryValue($status);
}
$queryParams['status'] = $this->apiClient->toQueryValue($status);
}
@@ -152,10 +152,10 @@ class PetApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
if(! $response) {
return null;
@@ -166,20 +166,20 @@ class PetApi {
return $responseObject;
}
/**
* findPetsByTags
/**
* findPetsByTags
*
* Finds Pets by tags
* Finds Pets by tags
*
* @param array[string] $tags Tags to filter by (required)
* @return array[Pet]
*/
*/
public function findPetsByTags($tags) {
// parse inputs
$resourcePath = "/pet/findByTags";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
// parse inputs
$resourcePath = "/pet/findByTags";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -188,8 +188,8 @@ class PetApi {
// query params
if($tags !== null) {
$queryParams['tags'] = $this->apiClient->toQueryValue($tags);
}
$queryParams['tags'] = $this->apiClient->toQueryValue($tags);
}
@@ -202,10 +202,10 @@ class PetApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
if(! $response) {
return null;
@@ -216,20 +216,20 @@ class PetApi {
return $responseObject;
}
/**
* getPetById
/**
* getPetById
*
* Find pet by ID
* Find pet by ID
*
* @param int $pet_id ID of pet that needs to be fetched (required)
* @return Pet
*/
*/
public function getPetById($pet_id) {
// parse inputs
$resourcePath = "/pet/{petId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
// parse inputs
$resourcePath = "/pet/{petId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -240,9 +240,9 @@ class PetApi {
// path params
if($pet_id !== null) {
$resourcePath = str_replace("{" . "petId" . "}",
$this->apiClient->toPathValue($pet_id), $resourcePath);
}
$resourcePath = str_replace("{" . "petId" . "}",
$this->apiClient->toPathValue($pet_id), $resourcePath);
}
@@ -253,10 +253,10 @@ class PetApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
if(! $response) {
return null;
@@ -267,22 +267,22 @@ class PetApi {
return $responseObject;
}
/**
* updatePetWithForm
/**
* updatePetWithForm
*
* Updates a pet in the store with form data
* Updates a pet in the store with form data
*
* @param string $pet_id ID of pet that needs to be updated (required)
* @param string $name Updated name of the pet (required)
* @param string $status Updated status of the pet (required)
* @return void
*/
*/
public function updatePetWithForm($pet_id, $name, $status) {
// parse inputs
$resourcePath = "/pet/{petId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
// parse inputs
$resourcePath = "/pet/{petId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -293,9 +293,9 @@ class PetApi {
// path params
if($pet_id !== null) {
$resourcePath = str_replace("{" . "petId" . "}",
$this->apiClient->toPathValue($pet_id), $resourcePath);
}
$resourcePath = str_replace("{" . "petId" . "}",
$this->apiClient->toPathValue($pet_id), $resourcePath);
}
// form params
if ($name !== null) {
$formParams['name'] = $this->apiClient->toFormValue($name);
@@ -312,29 +312,29 @@ class PetApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* deletePet
/**
* deletePet
*
* Deletes a pet
* Deletes a pet
*
* @param string $api_key (required)
* @param int $pet_id Pet id to delete (required)
* @return void
*/
*/
public function deletePet($api_key, $pet_id) {
// parse inputs
$resourcePath = "/pet/{petId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "DELETE";
// parse inputs
$resourcePath = "/pet/{petId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "DELETE";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -344,13 +344,13 @@ class PetApi {
// header params
if($api_key !== null) {
$headerParams['api_key'] = $this->apiClient->toHeaderValue($api_key);
}
$headerParams['api_key'] = $this->apiClient->toHeaderValue($api_key);
}
// path params
if($pet_id !== null) {
$resourcePath = str_replace("{" . "petId" . "}",
$this->apiClient->toPathValue($pet_id), $resourcePath);
}
$resourcePath = str_replace("{" . "petId" . "}",
$this->apiClient->toPathValue($pet_id), $resourcePath);
}
@@ -361,30 +361,30 @@ class PetApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* uploadFile
/**
* uploadFile
*
* uploads an image
* uploads an image
*
* @param int $pet_id ID of pet to update (required)
* @param string $additional_metadata Additional data to pass to server (required)
* @param file $file file to upload (required)
* @return void
*/
*/
public function uploadFile($pet_id, $additional_metadata, $file) {
// parse inputs
$resourcePath = "/pet/{petId}/uploadImage";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
// parse inputs
$resourcePath = "/pet/{petId}/uploadImage";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -395,9 +395,9 @@ class PetApi {
// path params
if($pet_id !== null) {
$resourcePath = str_replace("{" . "petId" . "}",
$this->apiClient->toPathValue($pet_id), $resourcePath);
}
$resourcePath = str_replace("{" . "petId" . "}",
$this->apiClient->toPathValue($pet_id), $resourcePath);
}
// form params
if ($additional_metadata !== null) {
$formParams['additionalMetadata'] = $this->apiClient->toFormValue($additional_metadata);
@@ -414,10 +414,10 @@ class PetApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}

View File

@@ -21,24 +21,24 @@
*/
class StoreApi {
function __construct($apiClient) {
$this->apiClient = $apiClient;
}
function __construct($apiClient) {
$this->apiClient = $apiClient;
}
/**
* getInventory
/**
* getInventory
*
* Returns pet inventories by status
* Returns pet inventories by status
*
* @return map[string,int]
*/
*/
public function getInventory() {
// parse inputs
$resourcePath = "/store/inventory";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
// parse inputs
$resourcePath = "/store/inventory";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -58,10 +58,10 @@ class StoreApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
if(! $response) {
return null;
@@ -72,20 +72,20 @@ class StoreApi {
return $responseObject;
}
/**
* placeOrder
/**
* placeOrder
*
* Place an order for a pet
* Place an order for a pet
*
* @param Order $body order placed for purchasing the pet (required)
* @return Order
*/
*/
public function placeOrder($body) {
// parse inputs
$resourcePath = "/store/order";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
// parse inputs
$resourcePath = "/store/order";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -109,10 +109,10 @@ class StoreApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
if(! $response) {
return null;
@@ -123,20 +123,20 @@ class StoreApi {
return $responseObject;
}
/**
* getOrderById
/**
* getOrderById
*
* Find purchase order by ID
* Find purchase order by ID
*
* @param string $order_id ID of pet that needs to be fetched (required)
* @return Order
*/
*/
public function getOrderById($order_id) {
// parse inputs
$resourcePath = "/store/order/{orderId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
// parse inputs
$resourcePath = "/store/order/{orderId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -147,9 +147,9 @@ class StoreApi {
// path params
if($order_id !== null) {
$resourcePath = str_replace("{" . "orderId" . "}",
$this->apiClient->toPathValue($order_id), $resourcePath);
}
$resourcePath = str_replace("{" . "orderId" . "}",
$this->apiClient->toPathValue($order_id), $resourcePath);
}
@@ -160,10 +160,10 @@ class StoreApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
if(! $response) {
return null;
@@ -174,20 +174,20 @@ class StoreApi {
return $responseObject;
}
/**
* deleteOrder
/**
* deleteOrder
*
* Delete purchase order by ID
* Delete purchase order by ID
*
* @param string $order_id ID of the order that needs to be deleted (required)
* @return void
*/
*/
public function deleteOrder($order_id) {
// parse inputs
$resourcePath = "/store/order/{orderId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "DELETE";
// parse inputs
$resourcePath = "/store/order/{orderId}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "DELETE";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -198,9 +198,9 @@ class StoreApi {
// path params
if($order_id !== null) {
$resourcePath = str_replace("{" . "orderId" . "}",
$this->apiClient->toPathValue($order_id), $resourcePath);
}
$resourcePath = str_replace("{" . "orderId" . "}",
$this->apiClient->toPathValue($order_id), $resourcePath);
}
@@ -211,10 +211,10 @@ class StoreApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}

View File

@@ -21,25 +21,25 @@
*/
class UserApi {
function __construct($apiClient) {
$this->apiClient = $apiClient;
}
function __construct($apiClient) {
$this->apiClient = $apiClient;
}
/**
* createUser
/**
* createUser
*
* Create user
* Create user
*
* @param User $body Created user object (required)
* @return void
*/
*/
public function createUser($body) {
// parse inputs
$resourcePath = "/user";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
// parse inputs
$resourcePath = "/user";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -63,28 +63,28 @@ class UserApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* createUsersWithArrayInput
/**
* createUsersWithArrayInput
*
* Creates list of users with given input array
* Creates list of users with given input array
*
* @param array[User] $body List of user object (required)
* @return void
*/
*/
public function createUsersWithArrayInput($body) {
// parse inputs
$resourcePath = "/user/createWithArray";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
// parse inputs
$resourcePath = "/user/createWithArray";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -108,28 +108,28 @@ class UserApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* createUsersWithListInput
/**
* createUsersWithListInput
*
* Creates list of users with given input array
* Creates list of users with given input array
*
* @param array[User] $body List of user object (required)
* @return void
*/
*/
public function createUsersWithListInput($body) {
// parse inputs
$resourcePath = "/user/createWithList";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
// parse inputs
$resourcePath = "/user/createWithList";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "POST";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -153,29 +153,29 @@ class UserApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* loginUser
/**
* loginUser
*
* Logs user into the system
* Logs user into the system
*
* @param string $username The user name for login (required)
* @param string $password The password for login in clear text (required)
* @return string
*/
*/
public function loginUser($username, $password) {
// parse inputs
$resourcePath = "/user/login";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
// parse inputs
$resourcePath = "/user/login";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -184,11 +184,11 @@ class UserApi {
// query params
if($username !== null) {
$queryParams['username'] = $this->apiClient->toQueryValue($username);
}// query params
$queryParams['username'] = $this->apiClient->toQueryValue($username);
}// query params
if($password !== null) {
$queryParams['password'] = $this->apiClient->toQueryValue($password);
}
$queryParams['password'] = $this->apiClient->toQueryValue($password);
}
@@ -201,10 +201,10 @@ class UserApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
if(! $response) {
return null;
@@ -215,19 +215,19 @@ class UserApi {
return $responseObject;
}
/**
* logoutUser
/**
* logoutUser
*
* Logs out current logged in user session
* Logs out current logged in user session
*
* @return void
*/
*/
public function logoutUser() {
// parse inputs
$resourcePath = "/user/logout";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
// parse inputs
$resourcePath = "/user/logout";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -247,28 +247,28 @@ class UserApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* getUserByName
/**
* getUserByName
*
* Get user by user name
* Get user by user name
*
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
* @return User
*/
*/
public function getUserByName($username) {
// parse inputs
$resourcePath = "/user/{username}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
// parse inputs
$resourcePath = "/user/{username}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -279,9 +279,9 @@ class UserApi {
// path params
if($username !== null) {
$resourcePath = str_replace("{" . "username" . "}",
$this->apiClient->toPathValue($username), $resourcePath);
}
$resourcePath = str_replace("{" . "username" . "}",
$this->apiClient->toPathValue($username), $resourcePath);
}
@@ -292,10 +292,10 @@ class UserApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
if(! $response) {
return null;
@@ -306,21 +306,21 @@ class UserApi {
return $responseObject;
}
/**
* updateUser
/**
* updateUser
*
* Updated user
* Updated user
*
* @param string $username name that need to be deleted (required)
* @param User $body Updated user object (required)
* @return void
*/
*/
public function updateUser($username, $body) {
// parse inputs
$resourcePath = "/user/{username}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "PUT";
// parse inputs
$resourcePath = "/user/{username}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "PUT";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -331,9 +331,9 @@ class UserApi {
// path params
if($username !== null) {
$resourcePath = str_replace("{" . "username" . "}",
$this->apiClient->toPathValue($username), $resourcePath);
}
$resourcePath = str_replace("{" . "username" . "}",
$this->apiClient->toPathValue($username), $resourcePath);
}
// body params
$body = null;
@@ -348,28 +348,28 @@ class UserApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}
/**
* deleteUser
/**
* deleteUser
*
* Delete user
* Delete user
*
* @param string $username The name that needs to be deleted (required)
* @return void
*/
*/
public function deleteUser($username) {
// parse inputs
$resourcePath = "/user/{username}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "DELETE";
// parse inputs
$resourcePath = "/user/{username}";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "DELETE";
$queryParams = array();
$headerParams = array();
$formParams = array();
@@ -380,9 +380,9 @@ class UserApi {
// path params
if($username !== null) {
$resourcePath = str_replace("{" . "username" . "}",
$this->apiClient->toPathValue($username), $resourcePath);
}
$resourcePath = str_replace("{" . "username" . "}",
$this->apiClient->toPathValue($username), $resourcePath);
}
@@ -393,10 +393,10 @@ class UserApi {
$body = http_build_query($body);
}
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
// make the API Call
$response = $this->apiClient->callAPI($resourcePath, $method,
$queryParams, $body,
$headerParams);
}