mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-07 19:08:52 +00:00
use baseName for parameter name in PHP api
This commit is contained in:
parent
dc5ee9dcf5
commit
7c23eedf07
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user