forked from loafle/openapi-generator-original
Add missing formParams to PHP api.mustache. Fixes #383.
Also fixed mixed tabs and spaces in template.
This commit is contained in:
parent
3abc42eee9
commit
7c342a060a
@ -67,10 +67,20 @@ class {{classname}} {
|
|||||||
}
|
}
|
||||||
{{/pathParams}}
|
{{/pathParams}}
|
||||||
|
|
||||||
//make the API Call
|
// Generate form params
|
||||||
if (! isset($body)) {
|
if (! isset($body)) {
|
||||||
|
$body = array();
|
||||||
|
}
|
||||||
|
{{#formParams}}
|
||||||
|
if(${{paramName}} != null) {
|
||||||
|
$body['{{paramName}}'] = ${{paramName}};
|
||||||
|
}
|
||||||
|
{{/formParams}}
|
||||||
|
if (empty($body)) {
|
||||||
$body = null;
|
$body = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Make the API Call
|
||||||
$response = $this->apiClient->callAPI($resourcePath, $method,
|
$response = $this->apiClient->callAPI($resourcePath, $method,
|
||||||
$queryParams, $body,
|
$queryParams, $body,
|
||||||
$headerParams);
|
$headerParams);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user