add file response for php

This commit is contained in:
wing328
2015-06-26 17:06:30 +08:00
parent 4c2df94ec7
commit fcd0b31d7d
22 changed files with 154 additions and 153 deletions

View File

@@ -110,7 +110,7 @@ class PetApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -171,7 +171,7 @@ class PetApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -231,13 +231,13 @@ class PetApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
$headerParams, '\Swagger\Client\Model\Pet[]');
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet[]');
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet[]', $httpHeader);
$e->setResponseObject($data);
break;
}
@@ -302,13 +302,13 @@ class PetApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
$headerParams, '\Swagger\Client\Model\Pet[]');
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet[]');
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet[]', $httpHeader);
$e->setResponseObject($data);
break;
}
@@ -375,9 +375,6 @@ class PetApi {
$httpBody = $formParams;
}
//TODO support oauth
$apiKey = $this->apiClient->getApiKeyWithPrefix('api_key');
if (isset($apiKey)) {
$headerParams['api_key'] = $apiKey;
@@ -385,15 +382,18 @@ class PetApi {
//TODO support oauth
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
$headerParams, '\Swagger\Client\Model\Pet');
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet');
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Pet', $httpHeader);
$e->setResponseObject($data);
break;
}
@@ -473,7 +473,7 @@ class PetApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -544,7 +544,7 @@ class PetApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -563,7 +563,7 @@ class PetApi {
*
* @param int $pet_id ID of pet to update (required)
* @param string $additional_metadata Additional data to pass to server (required)
* @param string $file file to upload (required)
* @param \SplFileObject $file file to upload (required)
* @return void
* @throws \Swagger\Client\ApiException on non-2xx response
*/
@@ -619,7 +619,7 @@ class PetApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {

View File

@@ -109,13 +109,13 @@ class StoreApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
$headerParams, 'map[string,int]');
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'map[string,int]');
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'map[string,int]', $httpHeader);
$e->setResponseObject($data);
break;
}
@@ -178,13 +178,13 @@ class StoreApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
$headerParams, '\Swagger\Client\Model\Order');
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order');
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order', $httpHeader);
$e->setResponseObject($data);
break;
}
@@ -253,13 +253,13 @@ class StoreApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
$headerParams, '\Swagger\Client\Model\Order');
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order');
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\Order', $httpHeader);
$e->setResponseObject($data);
break;
}
@@ -328,7 +328,7 @@ class StoreApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {

View File

@@ -107,7 +107,7 @@ class UserApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -165,7 +165,7 @@ class UserApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -223,7 +223,7 @@ class UserApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -284,13 +284,13 @@ class UserApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
$headerParams, 'string');
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string');
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'string', $httpHeader);
$e->setResponseObject($data);
break;
}
@@ -348,7 +348,7 @@ class UserApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -412,13 +412,13 @@ class UserApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
$headerParams, '\Swagger\Client\Model\User');
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\User');
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\User', $httpHeader);
$e->setResponseObject($data);
break;
}
@@ -492,7 +492,7 @@ class UserApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {
@@ -556,7 +556,7 @@ class UserApi {
// make the API Call
try {
$response = $this->apiClient->callAPI($resourcePath, $method,
$response = $this->apiClient->callApi($resourcePath, $method,
$queryParams, $httpBody,
$headerParams);
} catch (ApiException $e) {