diff --git a/modules/openapi-generator/src/main/resources/Javascript/package.mustache b/modules/openapi-generator/src/main/resources/Javascript/package.mustache index 05c74e781d..23515dd9c2 100644 --- a/modules/openapi-generator/src/main/resources/Javascript/package.mustache +++ b/modules/openapi-generator/src/main/resources/Javascript/package.mustache @@ -11,7 +11,7 @@ "fs": false }, "dependencies": { - "superagent": "3.7.0" + "superagent": "5.1.0" }, "devDependencies": { "expect.js": "^0.3.1", diff --git a/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION b/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION index 096bf47efe..83a328a922 100644 --- a/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION +++ b/samples/client/petstore/javascript-closure-angular/.openapi-generator/VERSION @@ -1 +1 @@ -3.0.0-SNAPSHOT \ No newline at end of file +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/client/petstore/javascript-closure-angular/API/Client/InlineObject.js b/samples/client/petstore/javascript-closure-angular/API/Client/InlineObject.js new file mode 100644 index 0000000000..99eff4f583 --- /dev/null +++ b/samples/client/petstore/javascript-closure-angular/API/Client/InlineObject.js @@ -0,0 +1,21 @@ +goog.provide('API.Client.inline_object'); + +/** + * @record + */ +API.Client.InlineObject = function() {} + +/** + * Updated name of the pet + * @type {!string} + * @export + */ +API.Client.InlineObject.prototype.name; + +/** + * Updated status of the pet + * @type {!string} + * @export + */ +API.Client.InlineObject.prototype.status; + diff --git a/samples/client/petstore/javascript-closure-angular/API/Client/InlineObject1.js b/samples/client/petstore/javascript-closure-angular/API/Client/InlineObject1.js new file mode 100644 index 0000000000..745eaacd23 --- /dev/null +++ b/samples/client/petstore/javascript-closure-angular/API/Client/InlineObject1.js @@ -0,0 +1,21 @@ +goog.provide('API.Client.inline_object_1'); + +/** + * @record + */ +API.Client.InlineObject1 = function() {} + +/** + * Additional data to pass to server + * @type {!string} + * @export + */ +API.Client.InlineObject1.prototype.additionalMetadata; + +/** + * file to upload + * @type {!Object} + * @export + */ +API.Client.InlineObject1.prototype.file; + diff --git a/samples/client/petstore/javascript-closure-angular/API/Client/PetApi.js b/samples/client/petstore/javascript-closure-angular/API/Client/PetApi.js index 6d065b731c..7c217bd629 100644 --- a/samples/client/petstore/javascript-closure-angular/API/Client/PetApi.js +++ b/samples/client/petstore/javascript-closure-angular/API/Client/PetApi.js @@ -165,10 +165,11 @@ API.Client.PetApi.prototype.findPetsByStatus = function(status, opt_extraHttpReq * Finds Pets by tags * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. * @param {!Array} tags Tags to filter by + * @param {!number=} opt_maxCount Maximum number of items to return * @param {!angular.$http.Config=} opt_extraHttpRequestParams Extra HTTP parameters to send. * @return {!angular.$q.Promise>} */ -API.Client.PetApi.prototype.findPetsByTags = function(tags, opt_extraHttpRequestParams) { +API.Client.PetApi.prototype.findPetsByTags = function(tags, opt_maxCount, opt_extraHttpRequestParams) { /** @const {string} */ var path = this.basePath_ + '/pet/findByTags'; @@ -185,6 +186,10 @@ API.Client.PetApi.prototype.findPetsByTags = function(tags, opt_extraHttpRequest queryParameters['tags'] = tags; } + if (opt_maxCount !== undefined) { + queryParameters['maxCount'] = opt_maxCount; + } + /** @type {!Object} */ var httpRequestParams = { method: 'GET', diff --git a/samples/client/petstore/javascript-promise/package.json b/samples/client/petstore/javascript-promise/package.json index 5a24b0488c..d194fab67c 100644 --- a/samples/client/petstore/javascript-promise/package.json +++ b/samples/client/petstore/javascript-promise/package.json @@ -11,7 +11,7 @@ "fs": false }, "dependencies": { - "superagent": "3.7.0" + "superagent": "5.1.0" }, "devDependencies": { "expect.js": "^0.3.1", diff --git a/samples/client/petstore/javascript/package.json b/samples/client/petstore/javascript/package.json index 5a24b0488c..d194fab67c 100644 --- a/samples/client/petstore/javascript/package.json +++ b/samples/client/petstore/javascript/package.json @@ -11,7 +11,7 @@ "fs": false }, "dependencies": { - "superagent": "3.7.0" + "superagent": "5.1.0" }, "devDependencies": { "expect.js": "^0.3.1", diff --git a/samples/openapi3/client/petstore/javascript-es6/.babelrc b/samples/openapi3/client/petstore/javascript-es6/.babelrc index 67b369ed37..c73df9d50b 100644 --- a/samples/openapi3/client/petstore/javascript-es6/.babelrc +++ b/samples/openapi3/client/petstore/javascript-es6/.babelrc @@ -1,3 +1,33 @@ { - "presets": ["env", "stage-0"] + "presets": [ + "@babel/preset-env" + ], + "plugins": [ + "@babel/plugin-syntax-dynamic-import", + "@babel/plugin-syntax-import-meta", + "@babel/plugin-proposal-class-properties", + "@babel/plugin-proposal-json-strings", + [ + "@babel/plugin-proposal-decorators", + { + "legacy": true + } + ], + "@babel/plugin-proposal-function-sent", + "@babel/plugin-proposal-export-namespace-from", + "@babel/plugin-proposal-numeric-separator", + "@babel/plugin-proposal-throw-expressions", + "@babel/plugin-proposal-export-default-from", + "@babel/plugin-proposal-logical-assignment-operators", + "@babel/plugin-proposal-optional-chaining", + [ + "@babel/plugin-proposal-pipeline-operator", + { + "proposal": "minimal" + } + ], + "@babel/plugin-proposal-nullish-coalescing-operator", + "@babel/plugin-proposal-do-expressions", + "@babel/plugin-proposal-function-bind" + ] } diff --git a/samples/openapi3/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/openapi3/client/petstore/javascript-es6/.openapi-generator/VERSION index 479c313e87..83a328a922 100644 --- a/samples/openapi3/client/petstore/javascript-es6/.openapi-generator/VERSION +++ b/samples/openapi3/client/petstore/javascript-es6/.openapi-generator/VERSION @@ -1 +1 @@ -4.0.3-SNAPSHOT \ No newline at end of file +4.1.0-SNAPSHOT \ No newline at end of file diff --git a/samples/openapi3/client/petstore/javascript-es6/package.json b/samples/openapi3/client/petstore/javascript-es6/package.json index 94455e4a69..6a738bcf33 100644 --- a/samples/openapi3/client/petstore/javascript-es6/package.json +++ b/samples/openapi3/client/petstore/javascript-es6/package.json @@ -7,19 +7,35 @@ "scripts": { "build": "babel src -d dist", "prepack": "npm run build", - "test": "mocha --compilers js:babel-core/register --recursive" + "test": "mocha --compilers js:@babel/register --recursive" }, "browser": { "fs": false }, "dependencies": { - "babel-cli": "^6.26.0", + "@babel/cli": "^7.0.0", "superagent": "3.7.0" }, "devDependencies": { - "babel-core": "6.26.0", - "babel-preset-env": "^1.6.1", - "babel-preset-stage-0": "^6.24.1", + "@babel/core": "^7.0.0", + "@babel/plugin-proposal-class-properties": "^7.0.0", + "@babel/plugin-proposal-decorators": "^7.0.0", + "@babel/plugin-proposal-do-expressions": "^7.0.0", + "@babel/plugin-proposal-export-default-from": "^7.0.0", + "@babel/plugin-proposal-export-namespace-from": "^7.0.0", + "@babel/plugin-proposal-function-bind": "^7.0.0", + "@babel/plugin-proposal-function-sent": "^7.0.0", + "@babel/plugin-proposal-json-strings": "^7.0.0", + "@babel/plugin-proposal-logical-assignment-operators": "^7.0.0", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.0.0", + "@babel/plugin-proposal-numeric-separator": "^7.0.0", + "@babel/plugin-proposal-optional-chaining": "^7.0.0", + "@babel/plugin-proposal-pipeline-operator": "^7.0.0", + "@babel/plugin-proposal-throw-expressions": "^7.0.0", + "@babel/plugin-syntax-dynamic-import": "^7.0.0", + "@babel/plugin-syntax-import-meta": "^7.0.0", + "@babel/preset-env": "^7.0.0", + "@babel/register": "^7.0.0", "expect.js": "^0.3.1", "mocha": "^5.2.0", "sinon": "^7.2.0"