mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-07-04 06:30:52 +00:00
Fixed mustache to handle non-required parameters
This commit is contained in:
parent
f6a1af2831
commit
4133cae2bc
@ -22,7 +22,7 @@ module {{package}} {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
public {{nickname}} ({{#allParams}}{{paramName}}: {{{dataType}}}, {{/allParams}} extraHttpRequestParams?: any ) : ng.IHttpPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}> {
|
public {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}, {{/allParams}}extraHttpRequestParams?: any ) : ng.IHttpPromise<{{#returnType}}{{{returnType}}}{{/returnType}}{{^returnType}}{}{{/returnType}}> {
|
||||||
var path = this.basePath + '{{path}}';
|
var path = this.basePath + '{{path}}';
|
||||||
{{#pathParams}}
|
{{#pathParams}}
|
||||||
path = path.replace('{' + '{{paramName}}' + '}', String({{paramName}}));
|
path = path.replace('{' + '{{paramName}}' + '}', String({{paramName}}));
|
||||||
|
@ -16,7 +16,7 @@ export class {{classname}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{#operation}}
|
{{#operation}}
|
||||||
public {{nickname}} ({{#allParams}}{{paramName}}: {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/allParams}} ) : Promise<{ response: http.ClientResponse; {{#returnType}}body: {{{returnType}}}; {{/returnType}} }> {
|
public {{nickname}} ({{#allParams}}{{paramName}}{{^required}}?{{/required}}: {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}) : Promise<{ response: http.ClientResponse; {{#returnType}}body: {{{returnType}}}; {{/returnType}} }> {
|
||||||
var path = this.url + this.basePath + '{{path}}';
|
var path = this.url + this.basePath + '{{path}}';
|
||||||
|
|
||||||
{{#pathParams}}
|
{{#pathParams}}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user