forked from loafle/openapi-generator-original
add debug switch to print out downloaded file info
This commit is contained in:
@@ -26,8 +26,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
@@ -52,12 +52,14 @@ class FakeApi
|
||||
|
||||
/**
|
||||
* API Client
|
||||
*
|
||||
* @var \Swagger\Client\ApiClient instance of the ApiClient
|
||||
*/
|
||||
protected $apiClient;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
||||
*/
|
||||
function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
||||
@@ -66,22 +68,25 @@ class FakeApi
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient->getConfig()->setHost('http://petstore.swagger.io/v2');
|
||||
}
|
||||
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get API client
|
||||
*
|
||||
* @return \Swagger\Client\ApiClient get the API client
|
||||
*/
|
||||
public function getApiClient()
|
||||
{
|
||||
return $this->apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the API client
|
||||
*
|
||||
* @param \Swagger\Client\ApiClient $apiClient set the API client
|
||||
*
|
||||
* @return FakeApi
|
||||
*/
|
||||
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
|
||||
@@ -89,9 +94,9 @@ class FakeApi
|
||||
$this->apiClient = $apiClient;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testEndpointParameters
|
||||
* Operation testEndpointParameters
|
||||
*
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*
|
||||
@@ -107,18 +112,19 @@ class FakeApi
|
||||
* @param \DateTime $date None (optional)
|
||||
* @param \DateTime $date_time None (optional)
|
||||
* @param string $password None (optional)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function testEndpointParameters($number, $double, $string, $byte, $integer = null, $int32 = null, $int64 = null, $float = null, $binary = null, $date = null, $date_time = null, $password = null)
|
||||
{
|
||||
list($response) = $this->testEndpointParametersWithHttpInfo ($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password);
|
||||
return $response;
|
||||
list($response) = $this->testEndpointParametersWithHttpInfo($number, $double, $string, $byte, $integer, $int32, $int64, $float, $binary, $date, $date_time, $password);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* testEndpointParametersWithHttpInfo
|
||||
* Operation testEndpointParametersWithHttpInfo
|
||||
*
|
||||
* Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
|
||||
*
|
||||
@@ -134,6 +140,7 @@ class FakeApi
|
||||
* @param \DateTime $date None (optional)
|
||||
* @param \DateTime $date_time None (optional)
|
||||
* @param string $password None (optional)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -202,7 +209,7 @@ class FakeApi
|
||||
throw new \InvalidArgumentException('invalid length for "$password" when calling FakeApi.testEndpointParameters, must be bigger than or equal to 10.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/fake";
|
||||
$httpBody = '';
|
||||
@@ -214,7 +221,7 @@ class FakeApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -259,7 +266,7 @@ class FakeApi
|
||||
$formParams['password'] = $this->apiClient->getSerializer()->toFormValue($password);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -278,7 +285,7 @@ class FakeApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
@@ -52,12 +52,14 @@ class PetApi
|
||||
|
||||
/**
|
||||
* API Client
|
||||
*
|
||||
* @var \Swagger\Client\ApiClient instance of the ApiClient
|
||||
*/
|
||||
protected $apiClient;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
||||
*/
|
||||
function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
||||
@@ -66,22 +68,25 @@ class PetApi
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient->getConfig()->setHost('http://petstore.swagger.io/v2');
|
||||
}
|
||||
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get API client
|
||||
*
|
||||
* @return \Swagger\Client\ApiClient get the API client
|
||||
*/
|
||||
public function getApiClient()
|
||||
{
|
||||
return $this->apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the API client
|
||||
*
|
||||
* @param \Swagger\Client\ApiClient $apiClient set the API client
|
||||
*
|
||||
* @return PetApi
|
||||
*/
|
||||
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
|
||||
@@ -89,29 +94,31 @@ class PetApi
|
||||
$this->apiClient = $apiClient;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* addPet
|
||||
* Operation addPet
|
||||
*
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function addPet($body)
|
||||
{
|
||||
list($response) = $this->addPetWithHttpInfo ($body);
|
||||
return $response;
|
||||
list($response) = $this->addPetWithHttpInfo($body);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* addPetWithHttpInfo
|
||||
* Operation addPetWithHttpInfo
|
||||
*
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -122,7 +129,7 @@ class PetApi
|
||||
if ($body === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling addPet');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/pet";
|
||||
$httpBody = '';
|
||||
@@ -134,7 +141,7 @@ class PetApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -147,7 +154,7 @@ class PetApi
|
||||
if (isset($body)) {
|
||||
$_tempBody = $body;
|
||||
}
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -171,34 +178,36 @@ class PetApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* deletePet
|
||||
* Operation deletePet
|
||||
*
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param int $pet_id Pet id to delete (required)
|
||||
* @param string $api_key (optional)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function deletePet($pet_id, $api_key = null)
|
||||
{
|
||||
list($response) = $this->deletePetWithHttpInfo ($pet_id, $api_key);
|
||||
return $response;
|
||||
list($response) = $this->deletePetWithHttpInfo($pet_id, $api_key);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* deletePetWithHttpInfo
|
||||
* Operation deletePetWithHttpInfo
|
||||
*
|
||||
* Deletes a pet
|
||||
*
|
||||
* @param int $pet_id Pet id to delete (required)
|
||||
* @param string $api_key (optional)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -209,7 +218,7 @@ class PetApi
|
||||
if ($pet_id === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling deletePet');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/pet/{petId}";
|
||||
$httpBody = '';
|
||||
@@ -221,7 +230,7 @@ class PetApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
// header params
|
||||
if ($api_key !== null) {
|
||||
@@ -240,7 +249,7 @@ class PetApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -264,32 +273,34 @@ class PetApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* findPetsByStatus
|
||||
* Operation findPetsByStatus
|
||||
*
|
||||
* Finds Pets by status
|
||||
*
|
||||
* @param string[] $status Status values that need to be considered for filter (required)
|
||||
*
|
||||
* @return \Swagger\Client\Model\Pet[]
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function findPetsByStatus($status)
|
||||
{
|
||||
list($response) = $this->findPetsByStatusWithHttpInfo ($status);
|
||||
return $response;
|
||||
list($response) = $this->findPetsByStatusWithHttpInfo($status);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* findPetsByStatusWithHttpInfo
|
||||
* Operation findPetsByStatusWithHttpInfo
|
||||
*
|
||||
* Finds Pets by status
|
||||
*
|
||||
* @param string[] $status Status values that need to be considered for filter (required)
|
||||
*
|
||||
* @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -300,7 +311,7 @@ class PetApi
|
||||
if ($status === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $status when calling findPetsByStatus');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/pet/findByStatus";
|
||||
$httpBody = '';
|
||||
@@ -312,7 +323,7 @@ class PetApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
// query params
|
||||
if (is_array($status)) {
|
||||
$status = $this->apiClient->getSerializer()->serializeCollection($status, 'csv', true);
|
||||
@@ -327,7 +338,7 @@ class PetApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -358,32 +369,34 @@ class PetApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* findPetsByTags
|
||||
* Operation findPetsByTags
|
||||
*
|
||||
* Finds Pets by tags
|
||||
*
|
||||
* @param string[] $tags Tags to filter by (required)
|
||||
*
|
||||
* @return \Swagger\Client\Model\Pet[]
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function findPetsByTags($tags)
|
||||
{
|
||||
list($response) = $this->findPetsByTagsWithHttpInfo ($tags);
|
||||
return $response;
|
||||
list($response) = $this->findPetsByTagsWithHttpInfo($tags);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* findPetsByTagsWithHttpInfo
|
||||
* Operation findPetsByTagsWithHttpInfo
|
||||
*
|
||||
* Finds Pets by tags
|
||||
*
|
||||
* @param string[] $tags Tags to filter by (required)
|
||||
*
|
||||
* @return Array of \Swagger\Client\Model\Pet[], HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -394,7 +407,7 @@ class PetApi
|
||||
if ($tags === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $tags when calling findPetsByTags');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/pet/findByTags";
|
||||
$httpBody = '';
|
||||
@@ -406,7 +419,7 @@ class PetApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
// query params
|
||||
if (is_array($tags)) {
|
||||
$tags = $this->apiClient->getSerializer()->serializeCollection($tags, 'csv', true);
|
||||
@@ -421,7 +434,7 @@ class PetApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -452,32 +465,34 @@ class PetApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* getPetById
|
||||
* Operation getPetById
|
||||
*
|
||||
* Find pet by ID
|
||||
*
|
||||
* @param int $pet_id ID of pet to return (required)
|
||||
*
|
||||
* @return \Swagger\Client\Model\Pet
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function getPetById($pet_id)
|
||||
{
|
||||
list($response) = $this->getPetByIdWithHttpInfo ($pet_id);
|
||||
return $response;
|
||||
list($response) = $this->getPetByIdWithHttpInfo($pet_id);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getPetByIdWithHttpInfo
|
||||
* Operation getPetByIdWithHttpInfo
|
||||
*
|
||||
* Find pet by ID
|
||||
*
|
||||
* @param int $pet_id ID of pet to return (required)
|
||||
*
|
||||
* @return Array of \Swagger\Client\Model\Pet, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -488,7 +503,7 @@ class PetApi
|
||||
if ($pet_id === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling getPetById');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/pet/{petId}";
|
||||
$httpBody = '';
|
||||
@@ -500,7 +515,7 @@ class PetApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
@@ -516,7 +531,7 @@ class PetApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -549,32 +564,34 @@ class PetApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* updatePet
|
||||
* Operation updatePet
|
||||
*
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function updatePet($body)
|
||||
{
|
||||
list($response) = $this->updatePetWithHttpInfo ($body);
|
||||
return $response;
|
||||
list($response) = $this->updatePetWithHttpInfo($body);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* updatePetWithHttpInfo
|
||||
* Operation updatePetWithHttpInfo
|
||||
*
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param \Swagger\Client\Model\Pet $body Pet object that needs to be added to the store (required)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -585,7 +602,7 @@ class PetApi
|
||||
if ($body === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling updatePet');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/pet";
|
||||
$httpBody = '';
|
||||
@@ -597,7 +614,7 @@ class PetApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/xml'));
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -610,7 +627,7 @@ class PetApi
|
||||
if (isset($body)) {
|
||||
$_tempBody = $body;
|
||||
}
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -634,36 +651,38 @@ class PetApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* updatePetWithForm
|
||||
* Operation updatePetWithForm
|
||||
*
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param int $pet_id ID of pet that needs to be updated (required)
|
||||
* @param string $name Updated name of the pet (optional)
|
||||
* @param string $status Updated status of the pet (optional)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function updatePetWithForm($pet_id, $name = null, $status = null)
|
||||
{
|
||||
list($response) = $this->updatePetWithFormWithHttpInfo ($pet_id, $name, $status);
|
||||
return $response;
|
||||
list($response) = $this->updatePetWithFormWithHttpInfo($pet_id, $name, $status);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* updatePetWithFormWithHttpInfo
|
||||
* Operation updatePetWithFormWithHttpInfo
|
||||
*
|
||||
* Updates a pet in the store with form data
|
||||
*
|
||||
* @param int $pet_id ID of pet that needs to be updated (required)
|
||||
* @param string $name Updated name of the pet (optional)
|
||||
* @param string $status Updated status of the pet (optional)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -674,7 +693,7 @@ class PetApi
|
||||
if ($pet_id === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling updatePetWithForm');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/pet/{petId}";
|
||||
$httpBody = '';
|
||||
@@ -686,7 +705,7 @@ class PetApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/x-www-form-urlencoded'));
|
||||
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
@@ -708,7 +727,7 @@ class PetApi
|
||||
$formParams['status'] = $this->apiClient->getSerializer()->toFormValue($status);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -732,36 +751,38 @@ class PetApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* uploadFile
|
||||
* Operation uploadFile
|
||||
*
|
||||
* uploads an image
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
* @param \SplFileObject $file file to upload (optional)
|
||||
*
|
||||
* @return \Swagger\Client\Model\ApiResponse
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function uploadFile($pet_id, $additional_metadata = null, $file = null)
|
||||
{
|
||||
list($response) = $this->uploadFileWithHttpInfo ($pet_id, $additional_metadata, $file);
|
||||
return $response;
|
||||
list($response) = $this->uploadFileWithHttpInfo($pet_id, $additional_metadata, $file);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* uploadFileWithHttpInfo
|
||||
* Operation uploadFileWithHttpInfo
|
||||
*
|
||||
* uploads an image
|
||||
*
|
||||
* @param int $pet_id ID of pet to update (required)
|
||||
* @param string $additional_metadata Additional data to pass to server (optional)
|
||||
* @param \SplFileObject $file file to upload (optional)
|
||||
*
|
||||
* @return Array of \Swagger\Client\Model\ApiResponse, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -772,7 +793,7 @@ class PetApi
|
||||
if ($pet_id === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $pet_id when calling uploadFile');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/pet/{petId}/uploadImage";
|
||||
$httpBody = '';
|
||||
@@ -784,7 +805,7 @@ class PetApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('multipart/form-data'));
|
||||
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
@@ -812,7 +833,7 @@ class PetApi
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -843,7 +864,7 @@ class PetApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
@@ -52,12 +52,14 @@ class StoreApi
|
||||
|
||||
/**
|
||||
* API Client
|
||||
*
|
||||
* @var \Swagger\Client\ApiClient instance of the ApiClient
|
||||
*/
|
||||
protected $apiClient;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
||||
*/
|
||||
function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
||||
@@ -66,22 +68,25 @@ class StoreApi
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient->getConfig()->setHost('http://petstore.swagger.io/v2');
|
||||
}
|
||||
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get API client
|
||||
*
|
||||
* @return \Swagger\Client\ApiClient get the API client
|
||||
*/
|
||||
public function getApiClient()
|
||||
{
|
||||
return $this->apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the API client
|
||||
*
|
||||
* @param \Swagger\Client\ApiClient $apiClient set the API client
|
||||
*
|
||||
* @return StoreApi
|
||||
*/
|
||||
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
|
||||
@@ -89,29 +94,31 @@ class StoreApi
|
||||
$this->apiClient = $apiClient;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* deleteOrder
|
||||
* Operation deleteOrder
|
||||
*
|
||||
* Delete purchase order by ID
|
||||
*
|
||||
* @param string $order_id ID of the order that needs to be deleted (required)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function deleteOrder($order_id)
|
||||
{
|
||||
list($response) = $this->deleteOrderWithHttpInfo ($order_id);
|
||||
return $response;
|
||||
list($response) = $this->deleteOrderWithHttpInfo($order_id);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* deleteOrderWithHttpInfo
|
||||
* Operation deleteOrderWithHttpInfo
|
||||
*
|
||||
* Delete purchase order by ID
|
||||
*
|
||||
* @param string $order_id ID of the order that needs to be deleted (required)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -126,7 +133,7 @@ class StoreApi
|
||||
throw new \InvalidArgumentException('invalid value for "$order_id" when calling StoreApi.deleteOrder, must be bigger than or equal to 1.0.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/store/order/{orderId}";
|
||||
$httpBody = '';
|
||||
@@ -138,7 +145,7 @@ class StoreApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
@@ -154,7 +161,7 @@ class StoreApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -173,36 +180,38 @@ class StoreApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* getInventory
|
||||
* Operation getInventory
|
||||
*
|
||||
* Returns pet inventories by status
|
||||
*
|
||||
*
|
||||
* @return map[string,int]
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function getInventory()
|
||||
{
|
||||
list($response) = $this->getInventoryWithHttpInfo ();
|
||||
return $response;
|
||||
list($response) = $this->getInventoryWithHttpInfo();
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getInventoryWithHttpInfo
|
||||
* Operation getInventoryWithHttpInfo
|
||||
*
|
||||
* Returns pet inventories by status
|
||||
*
|
||||
*
|
||||
* @return Array of map[string,int], HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function getInventoryWithHttpInfo()
|
||||
{
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/store/inventory";
|
||||
$httpBody = '';
|
||||
@@ -214,7 +223,7 @@ class StoreApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -223,7 +232,7 @@ class StoreApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -256,32 +265,34 @@ class StoreApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* getOrderById
|
||||
* Operation getOrderById
|
||||
*
|
||||
* Find purchase order by ID
|
||||
*
|
||||
* @param int $order_id ID of pet that needs to be fetched (required)
|
||||
*
|
||||
* @return \Swagger\Client\Model\Order
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function getOrderById($order_id)
|
||||
{
|
||||
list($response) = $this->getOrderByIdWithHttpInfo ($order_id);
|
||||
return $response;
|
||||
list($response) = $this->getOrderByIdWithHttpInfo($order_id);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getOrderByIdWithHttpInfo
|
||||
* Operation getOrderByIdWithHttpInfo
|
||||
*
|
||||
* Find purchase order by ID
|
||||
*
|
||||
* @param int $order_id ID of pet that needs to be fetched (required)
|
||||
*
|
||||
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -299,7 +310,7 @@ class StoreApi
|
||||
throw new \InvalidArgumentException('invalid value for "$order_id" when calling StoreApi.getOrderById, must be bigger than or equal to 1.0.');
|
||||
}
|
||||
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/store/order/{orderId}";
|
||||
$httpBody = '';
|
||||
@@ -311,7 +322,7 @@ class StoreApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
@@ -327,7 +338,7 @@ class StoreApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -353,32 +364,34 @@ class StoreApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* placeOrder
|
||||
* Operation placeOrder
|
||||
*
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
||||
*
|
||||
* @return \Swagger\Client\Model\Order
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function placeOrder($body)
|
||||
{
|
||||
list($response) = $this->placeOrderWithHttpInfo ($body);
|
||||
return $response;
|
||||
list($response) = $this->placeOrderWithHttpInfo($body);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* placeOrderWithHttpInfo
|
||||
* Operation placeOrderWithHttpInfo
|
||||
*
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param \Swagger\Client\Model\Order $body order placed for purchasing the pet (required)
|
||||
*
|
||||
* @return Array of \Swagger\Client\Model\Order, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -389,7 +402,7 @@ class StoreApi
|
||||
if ($body === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling placeOrder');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/store/order";
|
||||
$httpBody = '';
|
||||
@@ -401,7 +414,7 @@ class StoreApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -414,7 +427,7 @@ class StoreApi
|
||||
if (isset($body)) {
|
||||
$_tempBody = $body;
|
||||
}
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -440,7 +453,7 @@ class StoreApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -26,8 +26,8 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* NOTE: This class is auto generated by the swagger code generator program.
|
||||
* https://github.com/swagger-api/swagger-codegen
|
||||
* Do not edit the class manually.
|
||||
*/
|
||||
|
||||
@@ -52,12 +52,14 @@ class UserApi
|
||||
|
||||
/**
|
||||
* API Client
|
||||
*
|
||||
* @var \Swagger\Client\ApiClient instance of the ApiClient
|
||||
*/
|
||||
protected $apiClient;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param \Swagger\Client\ApiClient|null $apiClient The api client to use
|
||||
*/
|
||||
function __construct(\Swagger\Client\ApiClient $apiClient = null)
|
||||
@@ -66,22 +68,25 @@ class UserApi
|
||||
$apiClient = new ApiClient();
|
||||
$apiClient->getConfig()->setHost('http://petstore.swagger.io/v2');
|
||||
}
|
||||
|
||||
|
||||
$this->apiClient = $apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Get API client
|
||||
*
|
||||
* @return \Swagger\Client\ApiClient get the API client
|
||||
*/
|
||||
public function getApiClient()
|
||||
{
|
||||
return $this->apiClient;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Set the API client
|
||||
*
|
||||
* @param \Swagger\Client\ApiClient $apiClient set the API client
|
||||
*
|
||||
* @return UserApi
|
||||
*/
|
||||
public function setApiClient(\Swagger\Client\ApiClient $apiClient)
|
||||
@@ -89,29 +94,31 @@ class UserApi
|
||||
$this->apiClient = $apiClient;
|
||||
return $this;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createUser
|
||||
* Operation createUser
|
||||
*
|
||||
* Create user
|
||||
*
|
||||
* @param \Swagger\Client\Model\User $body Created user object (required)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function createUser($body)
|
||||
{
|
||||
list($response) = $this->createUserWithHttpInfo ($body);
|
||||
return $response;
|
||||
list($response) = $this->createUserWithHttpInfo($body);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createUserWithHttpInfo
|
||||
* Operation createUserWithHttpInfo
|
||||
*
|
||||
* Create user
|
||||
*
|
||||
* @param \Swagger\Client\Model\User $body Created user object (required)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -122,7 +129,7 @@ class UserApi
|
||||
if ($body === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUser');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/user";
|
||||
$httpBody = '';
|
||||
@@ -134,7 +141,7 @@ class UserApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -147,7 +154,7 @@ class UserApi
|
||||
if (isset($body)) {
|
||||
$_tempBody = $body;
|
||||
}
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -166,32 +173,34 @@ class UserApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* createUsersWithArrayInput
|
||||
* Operation createUsersWithArrayInput
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function createUsersWithArrayInput($body)
|
||||
{
|
||||
list($response) = $this->createUsersWithArrayInputWithHttpInfo ($body);
|
||||
return $response;
|
||||
list($response) = $this->createUsersWithArrayInputWithHttpInfo($body);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createUsersWithArrayInputWithHttpInfo
|
||||
* Operation createUsersWithArrayInputWithHttpInfo
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -202,7 +211,7 @@ class UserApi
|
||||
if ($body === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUsersWithArrayInput');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/user/createWithArray";
|
||||
$httpBody = '';
|
||||
@@ -214,7 +223,7 @@ class UserApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -227,7 +236,7 @@ class UserApi
|
||||
if (isset($body)) {
|
||||
$_tempBody = $body;
|
||||
}
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -246,32 +255,34 @@ class UserApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* createUsersWithListInput
|
||||
* Operation createUsersWithListInput
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function createUsersWithListInput($body)
|
||||
{
|
||||
list($response) = $this->createUsersWithListInputWithHttpInfo ($body);
|
||||
return $response;
|
||||
list($response) = $this->createUsersWithListInputWithHttpInfo($body);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* createUsersWithListInputWithHttpInfo
|
||||
* Operation createUsersWithListInputWithHttpInfo
|
||||
*
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param \Swagger\Client\Model\User[] $body List of user object (required)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -282,7 +293,7 @@ class UserApi
|
||||
if ($body === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling createUsersWithListInput');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/user/createWithList";
|
||||
$httpBody = '';
|
||||
@@ -294,7 +305,7 @@ class UserApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -307,7 +318,7 @@ class UserApi
|
||||
if (isset($body)) {
|
||||
$_tempBody = $body;
|
||||
}
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -326,32 +337,34 @@ class UserApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* deleteUser
|
||||
* Operation deleteUser
|
||||
*
|
||||
* Delete user
|
||||
*
|
||||
* @param string $username The name that needs to be deleted (required)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function deleteUser($username)
|
||||
{
|
||||
list($response) = $this->deleteUserWithHttpInfo ($username);
|
||||
return $response;
|
||||
list($response) = $this->deleteUserWithHttpInfo($username);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* deleteUserWithHttpInfo
|
||||
* Operation deleteUserWithHttpInfo
|
||||
*
|
||||
* Delete user
|
||||
*
|
||||
* @param string $username The name that needs to be deleted (required)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -362,7 +375,7 @@ class UserApi
|
||||
if ($username === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $username when calling deleteUser');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/user/{username}";
|
||||
$httpBody = '';
|
||||
@@ -374,7 +387,7 @@ class UserApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
@@ -390,7 +403,7 @@ class UserApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -409,32 +422,34 @@ class UserApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* getUserByName
|
||||
* Operation getUserByName
|
||||
*
|
||||
* Get user by user name
|
||||
*
|
||||
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
*
|
||||
* @return \Swagger\Client\Model\User
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function getUserByName($username)
|
||||
{
|
||||
list($response) = $this->getUserByNameWithHttpInfo ($username);
|
||||
return $response;
|
||||
list($response) = $this->getUserByNameWithHttpInfo($username);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* getUserByNameWithHttpInfo
|
||||
* Operation getUserByNameWithHttpInfo
|
||||
*
|
||||
* Get user by user name
|
||||
*
|
||||
* @param string $username The name that needs to be fetched. Use user1 for testing. (required)
|
||||
*
|
||||
* @return Array of \Swagger\Client\Model\User, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -445,7 +460,7 @@ class UserApi
|
||||
if ($username === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $username when calling getUserByName');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/user/{username}";
|
||||
$httpBody = '';
|
||||
@@ -457,7 +472,7 @@ class UserApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
@@ -473,7 +488,7 @@ class UserApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -499,34 +514,36 @@ class UserApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* loginUser
|
||||
* Operation loginUser
|
||||
*
|
||||
* 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
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function loginUser($username, $password)
|
||||
{
|
||||
list($response) = $this->loginUserWithHttpInfo ($username, $password);
|
||||
return $response;
|
||||
list($response) = $this->loginUserWithHttpInfo($username, $password);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* loginUserWithHttpInfo
|
||||
* Operation loginUserWithHttpInfo
|
||||
*
|
||||
* 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 Array of string, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -542,7 +559,7 @@ class UserApi
|
||||
if ($password === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $password when calling loginUser');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/user/login";
|
||||
$httpBody = '';
|
||||
@@ -554,7 +571,7 @@ class UserApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
// query params
|
||||
if ($username !== null) {
|
||||
$queryParams['username'] = $this->apiClient->getSerializer()->toQueryValue($username);
|
||||
@@ -569,7 +586,7 @@ class UserApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -595,36 +612,38 @@ class UserApi
|
||||
$e->setResponseObject($data);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* logoutUser
|
||||
* Operation logoutUser
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function logoutUser()
|
||||
{
|
||||
list($response) = $this->logoutUserWithHttpInfo ();
|
||||
return $response;
|
||||
list($response) = $this->logoutUserWithHttpInfo();
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* logoutUserWithHttpInfo
|
||||
* Operation logoutUserWithHttpInfo
|
||||
*
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function logoutUserWithHttpInfo()
|
||||
{
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/user/logout";
|
||||
$httpBody = '';
|
||||
@@ -636,7 +655,7 @@ class UserApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -645,7 +664,7 @@ class UserApi
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -664,34 +683,36 @@ class UserApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* updateUser
|
||||
* Operation updateUser
|
||||
*
|
||||
* Updated user
|
||||
*
|
||||
* @param string $username name that need to be deleted (required)
|
||||
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
||||
*
|
||||
* @return void
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
public function updateUser($username, $body)
|
||||
{
|
||||
list($response) = $this->updateUserWithHttpInfo ($username, $body);
|
||||
return $response;
|
||||
list($response) = $this->updateUserWithHttpInfo($username, $body);
|
||||
return $response;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* updateUserWithHttpInfo
|
||||
* Operation updateUserWithHttpInfo
|
||||
*
|
||||
* Updated user
|
||||
*
|
||||
* @param string $username name that need to be deleted (required)
|
||||
* @param \Swagger\Client\Model\User $body Updated user object (required)
|
||||
*
|
||||
* @return Array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
* @throws \Swagger\Client\ApiException on non-2xx response
|
||||
*/
|
||||
@@ -707,7 +728,7 @@ class UserApi
|
||||
if ($body === null) {
|
||||
throw new \InvalidArgumentException('Missing the required parameter $body when calling updateUser');
|
||||
}
|
||||
|
||||
|
||||
// parse inputs
|
||||
$resourcePath = "/user/{username}";
|
||||
$httpBody = '';
|
||||
@@ -719,7 +740,7 @@ class UserApi
|
||||
$headerParams['Accept'] = $_header_accept;
|
||||
}
|
||||
$headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array());
|
||||
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
@@ -739,7 +760,7 @@ class UserApi
|
||||
if (isset($body)) {
|
||||
$_tempBody = $body;
|
||||
}
|
||||
|
||||
|
||||
// for model (json/xml)
|
||||
if (isset($_tempBody)) {
|
||||
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||
@@ -758,7 +779,7 @@ class UserApi
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user