From 0e65f649bc59ea668d6965b4f44f7b02175c6d62 Mon Sep 17 00:00:00 2001 From: Michael Kourlas Date: Tue, 11 Apr 2017 05:52:32 -0400 Subject: [PATCH] [JavaScript] Fix for issue #5358: Regression in 2.3 using `multi` parameters (Cannot read property 'buildCollectionParam' of undefined) (#5362) * Fix for issue #5358 * Update tests for #5358 --- .../src/main/resources/Javascript/ApiClient.mustache | 2 +- samples/client/petstore/javascript-promise/src/ApiClient.js | 2 +- samples/client/petstore/javascript/src/ApiClient.js | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/swagger-codegen/src/main/resources/Javascript/ApiClient.mustache b/modules/swagger-codegen/src/main/resources/Javascript/ApiClient.mustache index 8a2ea174fd2..2fa4a62ccf2 100644 --- a/modules/swagger-codegen/src/main/resources/Javascript/ApiClient.mustache +++ b/modules/swagger-codegen/src/main/resources/Javascript/ApiClient.mustache @@ -391,7 +391,7 @@ } } else { // All other collection query parameters should be treated as ordinary query parameters. - queryParams[key] = this.apiClient.buildCollectionParam(param.value, param.collectionFormat); + queryParams[key] = this.buildCollectionParam(param.value, param.collectionFormat); } } } diff --git a/samples/client/petstore/javascript-promise/src/ApiClient.js b/samples/client/petstore/javascript-promise/src/ApiClient.js index edf77def335..53f920fb382 100644 --- a/samples/client/petstore/javascript-promise/src/ApiClient.js +++ b/samples/client/petstore/javascript-promise/src/ApiClient.js @@ -385,7 +385,7 @@ } } else { // All other collection query parameters should be treated as ordinary query parameters. - queryParams[key] = this.apiClient.buildCollectionParam(param.value, param.collectionFormat); + queryParams[key] = this.buildCollectionParam(param.value, param.collectionFormat); } } } diff --git a/samples/client/petstore/javascript/src/ApiClient.js b/samples/client/petstore/javascript/src/ApiClient.js index 2f010c4486f..1c6eefbb71b 100644 --- a/samples/client/petstore/javascript/src/ApiClient.js +++ b/samples/client/petstore/javascript/src/ApiClient.js @@ -394,7 +394,7 @@ } } else { // All other collection query parameters should be treated as ordinary query parameters. - queryParams[key] = this.apiClient.buildCollectionParam(param.value, param.collectionFormat); + queryParams[key] = this.buildCollectionParam(param.value, param.collectionFormat); } } }