Merge pull request #477 from wing328/fix_php_basename

use baseName for parameter name in PHP api
This commit is contained in:
Tony Tam 2015-03-10 11:39:28 -07:00
commit b2977cd29b

View File

@ -50,20 +50,20 @@ class {{classname}} {
{{#queryParams}}// query params
if(${{paramName}} !== null) {
$queryParams['{{paramName}}'] = $this->apiClient->toQueryValue(${{paramName}});
$queryParams['{{baseName}}'] = $this->apiClient->toQueryValue(${{paramName}});
}{{/queryParams}}
{{#headerParams}}// header params
if(${{paramName}} !== null) {
$headerParams['{{paramName}}'] = $this->apiClient->toHeaderValue(${{paramName}});
$headerParams['{{baseName}}'] = $this->apiClient->toHeaderValue(${{paramName}});
}{{/headerParams}}
{{#pathParams}}// path params
if(${{paramName}} !== null) {
$resourcePath = str_replace("{" . "{{paramName}}" . "}",
$resourcePath = str_replace("{" . "{{baseName}}" . "}",
$this->apiClient->toPathValue(${{paramName}}), $resourcePath);
}{{/pathParams}}
{{#formParams}}
if (${{paramName}} !== null) {
$formParams[{{paramName}}] = {{#isFile}}'@' . {{/isFile}}${{paramName}};
$formParams[{{baseName}}] = {{#isFile}}'@' . {{/isFile}}${{paramName}};
}{{/formParams}}
{{#bodyParams}}// body params
$body = null;