Skip to content

Commit 781458b

Browse files
committed
Use the baseName when referring to path and query parameters.
1 parent 27e434d commit 781458b

File tree

1 file changed

+2
-2
lines changed
  • modules/swagger-codegen/src/main/resources/TypeScript-Angular

1 file changed

+2
-2
lines changed

modules/swagger-codegen/src/main/resources/TypeScript-Angular/api.mustache

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module {{package}} {
2727
var path = this.basePath + '{{path}}';
2828
2929
{{#pathParams}}
30-
path = path.replace('{' + '{{paramName}}' + '}', String({{paramName}}));
30+
path = path.replace('{' + '{{baseName}}' + '}', String({{paramName}}));
3131

3232
{{/pathParams}}
3333
var queryParameters: any = {};
@@ -44,7 +44,7 @@ module {{package}} {
4444
{{/allParams}}
4545
{{#queryParams}}
4646
if ({{paramName}} !== undefined) {
47-
queryParameters['{{paramName}}'] = {{paramName}};
47+
queryParameters['{{baseName}}'] = {{paramName}};
4848
}
4949

5050
{{/queryParams}}

0 commit comments

Comments
 (0)