mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 22:50:53 +00:00
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['{{baseName}}'] = {{#isFile}}'@' . {{/isFile}}$this->apiClient->toFormValue(${{paramName}});
|
||||||
}{{/formParams}}
|
}{{/formParams}}
|
||||||
{{#bodyParams}}// body params
|
{{#bodyParams}}// body params
|
||||||
$body = null;
|
$_tempBody = null;
|
||||||
if (isset(${{paramName}})) {
|
if (isset(${{paramName}})) {
|
||||||
$body = ${{paramName}};
|
$_tempBody = ${{paramName}};
|
||||||
}{{/bodyParams}}
|
}{{/bodyParams}}
|
||||||
|
|
||||||
// for model (json/xml)
|
// for model (json/xml)
|
||||||
if (isset($body)) {
|
if (isset($_tempBody)) {
|
||||||
$httpBody = $body; // $body is the method argument, if present
|
$httpBody = $_tempBody; // $_tempBody is the method argument, if present
|
||||||
}
|
}
|
||||||
|
|
||||||
// for HTTP post (form)
|
// for HTTP post (form)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user