diff --git a/modules/swagger-codegen/src/main/resources/Javascript-es6/api_doc.mustache b/modules/swagger-codegen/src/main/resources/Javascript-es6/api_doc.mustache index b09ec5711af..eb0f2e36ce8 100644 --- a/modules/swagger-codegen/src/main/resources/Javascript-es6/api_doc.mustache +++ b/modules/swagger-codegen/src/main/resources/Javascript-es6/api_doc.mustache @@ -22,7 +22,7 @@ Method | HTTP request | Description ```javascript import {{{moduleName}}} from '{{{projectName}}}'; {{#hasAuthMethods}} -let defaultClient = {{{moduleName}}}.ApiClient.default; +let defaultClient = {{{moduleName}}}.ApiClient.instance; {{#authMethods}}{{#isBasic}} // Configure HTTP basic authorization: {{{name}}} let {{{name}}} = defaultClient.authentications['{{{name}}}']; diff --git a/samples/client/petstore-security-test/javascript/.swagger-codegen/VERSION b/samples/client/petstore-security-test/javascript/.swagger-codegen/VERSION new file mode 100644 index 00000000000..7fea99011a6 --- /dev/null +++ b/samples/client/petstore-security-test/javascript/.swagger-codegen/VERSION @@ -0,0 +1 @@ +2.2.3-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore-security-test/javascript/src/ApiClient.js b/samples/client/petstore-security-test/javascript/src/ApiClient.js index 46cb2e31e74..4557fa86df5 100644 --- a/samples/client/petstore-security-test/javascript/src/ApiClient.js +++ b/samples/client/petstore-security-test/javascript/src/ApiClient.js @@ -7,6 +7,9 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.2.3-SNAPSHOT + * * Do not edit the class manually. * */ @@ -425,6 +428,8 @@ if (returnType === 'Blob') { request.responseType('blob'); + } else if (returnType === 'String') { + request.responseType('string'); } // Attach previously saved cookies, if enabled diff --git a/samples/client/petstore-security-test/javascript/src/api/FakeApi.js b/samples/client/petstore-security-test/javascript/src/api/FakeApi.js index ce404353b35..7571d260f22 100644 --- a/samples/client/petstore-security-test/javascript/src/api/FakeApi.js +++ b/samples/client/petstore-security-test/javascript/src/api/FakeApi.js @@ -7,6 +7,9 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.2.3-SNAPSHOT + * * Do not edit the class manually. * */ diff --git a/samples/client/petstore-security-test/javascript/src/index.js b/samples/client/petstore-security-test/javascript/src/index.js index 03dc50ff27b..24c45e90a68 100644 --- a/samples/client/petstore-security-test/javascript/src/index.js +++ b/samples/client/petstore-security-test/javascript/src/index.js @@ -7,6 +7,9 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.2.3-SNAPSHOT + * * Do not edit the class manually. * */ diff --git a/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js b/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js index c6961f5673f..40043ceb412 100644 --- a/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js +++ b/samples/client/petstore-security-test/javascript/src/model/ModelReturn.js @@ -7,6 +7,9 @@ * * NOTE: This class is auto generated by the swagger code generator program. * https://github.com/swagger-api/swagger-codegen.git + * + * Swagger Codegen version: 2.2.3-SNAPSHOT + * * Do not edit the class manually. * */