A proposed fix for Issue #628

This commit is contained in:
who 2015-04-13 13:14:10 -07:00
parent 444666a365
commit 42829ffb13

View File

@ -73,14 +73,14 @@ class {{classname}} {
$formParams['{{baseName}}'] = {{#isFile}}'@' . {{/isFile}}$this->apiClient->toFormValue(${{paramName}});
}{{/formParams}}
{{#bodyParams}}// body params
$body = null;
$_tempBody = null;
if (isset(${{paramName}})) {
$body = ${{paramName}};
$_tempBody = ${{paramName}};
}{{/bodyParams}}
// for model (json/xml)
if (isset($body)) {
$httpBody = $body; // $body is the method argument, if present
if (isset($_tempBody)) {
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
}
// for HTTP post (form)