forked from loafle/openapi-generator-original
A proposed fix for Issue #628
This commit is contained in:
parent
444666a365
commit
42829ffb13
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user