php remove duplicated type mapping

This commit is contained in:
wing328
2015-12-29 15:00:56 +08:00
parent 6e4d097710
commit 11d6bb9a95
3 changed files with 3 additions and 84 deletions

View File

@@ -738,86 +738,6 @@ class PetApi
}
}
/**
* downloadFile
*
* downloads an image
*
* @return \Swagger\Client\Model\File
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function downloadFile()
{
list($response, $statusCode, $httpHeader) = $this->downloadFileWithHttpInfo ();
return $response;
}
/**
* downloadFileWithHttpInfo
*
* downloads an image
*
* @return Array of \Swagger\Client\Model\File, HTTP status code, HTTP response headers (array of strings)
* @throws \Swagger\Client\ApiException on non-2xx response
*/
public function downloadFileWithHttpInfo()
{
// parse inputs
$resourcePath = "/pet/{petId}/downloadImage";
$resourcePath = str_replace("{format}", "json", $resourcePath);
$method = "GET";
$httpBody = '';
$queryParams = array();
$headerParams = array();
$formParams = array();
$_header_accept = ApiClient::selectHeaderAccept(array('application/octet-stream'));
if (!is_null($_header_accept)) {
$headerParams['Accept'] = $_header_accept;
}
$headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array());
// for model (json/xml)
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
} elseif (count($formParams) > 0) {
$httpBody = $formParams; // for HTTP post (form)
}
// make the API Call
try {
list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(
$resourcePath, $method,
$queryParams, $httpBody,
$headerParams, '\Swagger\Client\Model\File'
);
if (!$response) {
return array(null, $statusCode, $httpHeader);
}
return array($this->apiClient->getSerializer()->deserialize($response, '\Swagger\Client\Model\File', $httpHeader), $statusCode, $httpHeader);
} catch (ApiException $e) {
switch ($e->getCode()) {
case 200:
$data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\Swagger\Client\Model\File', $e->getResponseHeaders());
$e->setResponseObject($data);
break;
}
throw $e;
}
}
/**
* uploadFile
*