From 1370c4a84c2d902bc3009ebc352ad12ea8f90e83 Mon Sep 17 00:00:00 2001
From: "akihito.nakano" <sora.akatsuki@gmail.com>
Date: Sat, 8 Jun 2019 16:07:29 +0900
Subject: [PATCH 1/4] Bump up babel version

---
 .../src/main/resources/Javascript-Flowtyped/babelrc      | 9 +++++++--
 .../main/resources/Javascript-Flowtyped/package.mustache | 9 +++++----
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/babelrc b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/babelrc
index 75148dc5edb..4bf17b5e66e 100644
--- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/babelrc
+++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/babelrc
@@ -1,4 +1,9 @@
 {
-  "presets": ["react-app"],
-  "plugins": ["transform-flow-strip-types"]
+  "presets": [
+    "react-app",
+    "@babel/preset-flow"
+  ],
+  "plugins": [
+    "@babel/plugin-transform-flow-strip-types"
+  ]
 }
diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache
index eed7d2042df..b8f07e12eec 100644
--- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache
+++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/package.mustache
@@ -27,10 +27,11 @@
     "portable-fetch": "^3.0.0"
   },
   "devDependencies": {
-    "babel-cli": "^6.26.0",
-    "babel-core": "^6.26.3",
-    "babel-plugin-transform-flow-strip-types": "^6.22.0",
-    "babel-preset-react-app": "^3.1.1",
+    "@babel/cli": "^7.0.0",
+    "@babel/core": "^7.0.0",
+    "@babel/plugin-transform-flow-strip-types": "^7.0.0",
+    "@babel/preset-flow": "^7.0.0",
+    "babel-preset-react-app": "^7.0.0",
     "flow-copy-source": "^1.3.0",
     "rimraf": "^2.6.2"
   }
-- 
GitLab


From 18a27a8c340f260982ba25110650f3b536250d6a Mon Sep 17 00:00:00 2001
From: "akihito.nakano" <sora.akatsuki@gmail.com>
Date: Sat, 8 Jun 2019 16:09:37 +0900
Subject: [PATCH 2/4] Update samples

bin/javascript-flowtyped-petstore.sh
---
 samples/client/petstore/javascript-flowtyped/.babelrc    | 9 +++++++--
 .../javascript-flowtyped/.openapi-generator/VERSION      | 2 +-
 .../client/petstore/javascript-flowtyped/package.json    | 9 +++++----
 samples/client/petstore/javascript-flowtyped/src/api.js  | 2 +-
 .../petstore/javascript-flowtyped/src/configuration.js   | 2 +-
 .../client/petstore/javascript-flowtyped/src/index.js    | 2 +-
 6 files changed, 16 insertions(+), 10 deletions(-)

diff --git a/samples/client/petstore/javascript-flowtyped/.babelrc b/samples/client/petstore/javascript-flowtyped/.babelrc
index 75148dc5edb..4bf17b5e66e 100644
--- a/samples/client/petstore/javascript-flowtyped/.babelrc
+++ b/samples/client/petstore/javascript-flowtyped/.babelrc
@@ -1,4 +1,9 @@
 {
-  "presets": ["react-app"],
-  "plugins": ["transform-flow-strip-types"]
+  "presets": [
+    "react-app",
+    "@babel/preset-flow"
+  ],
+  "plugins": [
+    "@babel/plugin-transform-flow-strip-types"
+  ]
 }
diff --git a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION
index afa63656064..d96260ba335 100644
--- a/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-flowtyped/.openapi-generator/VERSION
@@ -1 +1 @@
-4.0.0-SNAPSHOT
\ No newline at end of file
+4.0.2-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-flowtyped/package.json b/samples/client/petstore/javascript-flowtyped/package.json
index eb946480593..35f0d5bd937 100644
--- a/samples/client/petstore/javascript-flowtyped/package.json
+++ b/samples/client/petstore/javascript-flowtyped/package.json
@@ -22,10 +22,11 @@
     "portable-fetch": "^3.0.0"
   },
   "devDependencies": {
-    "babel-cli": "^6.26.0",
-    "babel-core": "^6.26.3",
-    "babel-plugin-transform-flow-strip-types": "^6.22.0",
-    "babel-preset-react-app": "^3.1.1",
+    "@babel/cli": "^7.0.0",
+    "@babel/core": "^7.0.0",
+    "@babel/plugin-transform-flow-strip-types": "^7.0.0",
+    "@babel/preset-flow": "^7.0.0",
+    "babel-preset-react-app": "^7.0.0",
     "flow-copy-source": "^1.3.0",
     "rimraf": "^2.6.2"
   }
diff --git a/samples/client/petstore/javascript-flowtyped/src/api.js b/samples/client/petstore/javascript-flowtyped/src/api.js
index a651816178b..bc4367b6dfc 100644
--- a/samples/client/petstore/javascript-flowtyped/src/api.js
+++ b/samples/client/petstore/javascript-flowtyped/src/api.js
@@ -4,7 +4,7 @@
  * OpenAPI Petstore
  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
  *
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
  *
  * NOTE: This class is auto generated by OpenAPI-Generator
  * https://openapi-generator.tech
diff --git a/samples/client/petstore/javascript-flowtyped/src/configuration.js b/samples/client/petstore/javascript-flowtyped/src/configuration.js
index e2717b94012..690f033dd1d 100644
--- a/samples/client/petstore/javascript-flowtyped/src/configuration.js
+++ b/samples/client/petstore/javascript-flowtyped/src/configuration.js
@@ -3,7 +3,7 @@
  * OpenAPI Petstore
  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
  *
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
  *
  * NOTE: This class is auto generated by OpenAPI-Generator
  * https://openapi-generator.tech
diff --git a/samples/client/petstore/javascript-flowtyped/src/index.js b/samples/client/petstore/javascript-flowtyped/src/index.js
index fc756135245..9864e99fec2 100644
--- a/samples/client/petstore/javascript-flowtyped/src/index.js
+++ b/samples/client/petstore/javascript-flowtyped/src/index.js
@@ -3,7 +3,7 @@
  * OpenAPI Petstore
  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
  *
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
  *
  * NOTE: This class is auto generated by OpenAPI-Generator
  * https://openapi-generator.tech
-- 
GitLab


From 7e86e58c17c401e4e4e26016ed798ab7c5b4e523 Mon Sep 17 00:00:00 2001
From: "akihito.nakano" <sora.akatsuki@gmail.com>
Date: Sat, 8 Jun 2019 16:14:30 +0900
Subject: [PATCH 3/4] The dependency `babel-preset-react-app` requires
 `NODE_ENV` or `BABEL_ENV`

---
 .../src/main/resources/Javascript-Flowtyped/README.mustache    | 3 ++-
 samples/client/petstore/javascript-flowtyped/README.md         | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache
index f13c6322bb9..e93ab6f53dd 100644
--- a/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache
+++ b/modules/openapi-generator/src/main/resources/Javascript-Flowtyped/README.mustache
@@ -18,7 +18,8 @@ Module system
 To build an compile the flow typed sources to javascript use:
 ```
 npm install
-npm run build
+# The dependency `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables
+env BABEL_ENV={YOUR_ENV} npm run build
 ```
 
 ### Publishing
diff --git a/samples/client/petstore/javascript-flowtyped/README.md b/samples/client/petstore/javascript-flowtyped/README.md
index f9b11cbd029..9c2bec57335 100644
--- a/samples/client/petstore/javascript-flowtyped/README.md
+++ b/samples/client/petstore/javascript-flowtyped/README.md
@@ -18,7 +18,8 @@ Module system
 To build an compile the flow typed sources to javascript use:
 ```
 npm install
-npm run build
+# The dependency `babel-preset-react-app` requires that you specify `NODE_ENV` or `BABEL_ENV` environment variables
+env BABEL_ENV={YOUR_ENV} npm run build
 ```
 
 ### Publishing
-- 
GitLab


From d69911373bd98049b293ecbd9070d946f0cafb3f Mon Sep 17 00:00:00 2001
From: "akihito.nakano" <sora.akatsuki@gmail.com>
Date: Sat, 8 Jun 2019 16:15:40 +0900
Subject: [PATCH 4/4] Run `env BABEL_ENV=development npm run build` to update
 the samples

---
 .../petstore/javascript-flowtyped/lib/api.js  | 2169 ++++++++---------
 .../javascript-flowtyped/lib/api.js.flow      |   16 +-
 .../javascript-flowtyped/lib/configuration.js |   84 +-
 .../lib/configuration.js.flow                 |    2 +-
 .../javascript-flowtyped/lib/index.js         |    4 +-
 .../javascript-flowtyped/lib/index.js.flow    |    2 +-
 6 files changed, 1114 insertions(+), 1163 deletions(-)

diff --git a/samples/client/petstore/javascript-flowtyped/lib/api.js b/samples/client/petstore/javascript-flowtyped/lib/api.js
index 0dec200768e..e0ed087f022 100644
--- a/samples/client/petstore/javascript-flowtyped/lib/api.js
+++ b/samples/client/petstore/javascript-flowtyped/lib/api.js
@@ -1,427 +1,391 @@
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
-
-function _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return call && (typeof call === "object" || typeof call === "function") ? call : self; }
-
-function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function, not " + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
+import _classCallCheck from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/classCallCheck";
+import _possibleConstructorReturn from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn";
+import _getPrototypeOf from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/getPrototypeOf";
+import _inherits from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/inherits";
+import _wrapNativeSuper from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/wrapNativeSuper";
 
 /* eslint-disable no-use-before-define */
+
 /**
  * OpenAPI Petstore
  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
  *
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
  *
  * NOTE: This class is auto generated by OpenAPI-Generator
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
-
 import * as url from "url";
 import * as portableFetch from "portable-fetch";
 import { Configuration } from "./configuration";
-
 var BASE_PATH = "http://petstore.swagger.io/v2".replace(/\/+$/, "");
-
 /**
  *
  * @export
  */
+
 export var COLLECTION_FORMATS = {
-    csv: ",",
-    ssv: " ",
-    tsv: "\t",
-    pipes: "|"
+  csv: ",",
+  ssv: " ",
+  tsv: "\t",
+  pipes: "|"
 };
-
-/**
- *
- * @export
- */
-
-
 /**
  *
  * @export
  */
 
-
-/**
- *
- * @export
- */
-
-
 /**
  * * @export
  * @class RequiredError
  * @extends {Error}
  */
-export var RequiredError = function (_Error) {
-    _inherits(RequiredError, _Error);
-
-    function RequiredError(field, msg) {
-        _classCallCheck(this, RequiredError);
+export var RequiredError =
+/*#__PURE__*/
+function (_Error) {
+  _inherits(RequiredError, _Error);
 
-        var _this = _possibleConstructorReturn(this, (RequiredError.__proto__ || Object.getPrototypeOf(RequiredError)).call(this, msg));
+  function RequiredError(field, msg) {
+    var _this;
 
-        _this.name = "RequiredError";
-        return _this;
-    }
+    _classCallCheck(this, RequiredError);
 
-    return RequiredError;
-}(Error);
+    _this = _possibleConstructorReturn(this, _getPrototypeOf(RequiredError).call(this, msg));
+    _this.name = "RequiredError";
+    return _this;
+  }
 
+  return RequiredError;
+}(_wrapNativeSuper(Error));
 /**
  * Describes the result of uploading an image resource
  * @export
  */
 
-
-/**
- * A category for a pet
- * @export
- */
-
-/**
- * An order for a pets from the pet store
- * @export
- */
-
-/**
- * A pet for sale in the pet store
- * @export
- */
-
-
-/**
- * A tag for a pet
- * @export
- */
-
-
-/**
- * A User who is purchasing from the pet store
- * @export
- */
-
-
 /**
  * PetApi - fetch parameter creator
  * @export
  */
 export var PetApiFetchParamCreator = function PetApiFetchParamCreator(configuration) {
-    return {
-        /**
-         * 
-         * @summary Add a new pet to the store
-         * @throws {RequiredError}
-         */
-        addPet: function addPet(body, options) {
-            // verify required parameter 'body' is not null or undefined
-            if (body === null || body === undefined) {
-                throw new RequiredError('body', 'Required parameter body was null or undefined when calling addPet.');
-            }
-            var localVarPath = "/pet";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            // authentication petstore_auth required
-            // oauth required
-            if (configuration && configuration.accessToken) {
-                var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
-                localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
-            }
-
-            localVarHeaderParameter['Content-Type'] = 'application/json';
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || "";
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Deletes a pet
-         * @throws {RequiredError}
-         */
-        deletePet: function deletePet(petId, apiKey, options) {
-            // verify required parameter 'petId' is not null or undefined
-            if (petId === null || petId === undefined) {
-                throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling deletePet.');
-            }
-            var localVarPath = "/pet/{petId}".replace("{" + "petId" + "}", encodeURIComponent(String(petId)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'DELETE' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            // authentication petstore_auth required
-            // oauth required
-            if (configuration && configuration.accessToken) {
-                var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
-                localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
-            }
-
-            if (apiKey !== undefined && apiKey !== null) {
-                localVarHeaderParameter['api_key'] = apiKey;
-            }
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * Multiple status values can be provided with comma separated strings
-         * @summary Finds Pets by status
-         * @throws {RequiredError}
-         */
-        findPetsByStatus: function findPetsByStatus(status, options) {
-            // verify required parameter 'status' is not null or undefined
-            if (status === null || status === undefined) {
-                throw new RequiredError('status', 'Required parameter status was null or undefined when calling findPetsByStatus.');
-            }
-            var localVarPath = "/pet/findByStatus";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            // authentication petstore_auth required
-            // oauth required
-            if (configuration && configuration.accessToken) {
-                var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
-                localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
-            }
-
-            if (status) {
-                localVarQueryParameter['status'] = status.join(COLLECTION_FORMATS["csv"]);
-            }
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
-         * @summary Finds Pets by tags
-         * @throws {RequiredError}
-         */
-        findPetsByTags: function findPetsByTags(tags, options) {
-            // verify required parameter 'tags' is not null or undefined
-            if (tags === null || tags === undefined) {
-                throw new RequiredError('tags', 'Required parameter tags was null or undefined when calling findPetsByTags.');
-            }
-            var localVarPath = "/pet/findByTags";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            // authentication petstore_auth required
-            // oauth required
-            if (configuration && configuration.accessToken) {
-                var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
-                localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
-            }
-
-            if (tags) {
-                localVarQueryParameter['tags'] = tags.join(COLLECTION_FORMATS["csv"]);
-            }
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * Returns a single pet
-         * @summary Find pet by ID
-         * @throws {RequiredError}
-         */
-        getPetById: function getPetById(petId, options) {
-            // verify required parameter 'petId' is not null or undefined
-            if (petId === null || petId === undefined) {
-                throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling getPetById.');
-            }
-            var localVarPath = "/pet/{petId}".replace("{" + "petId" + "}", encodeURIComponent(String(petId)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            // authentication api_key required
-            if (configuration && configuration.apiKey) {
-                var localVarApiKeyValue = typeof configuration.apiKey === 'function' ? configuration.apiKey("api_key") : configuration.apiKey;
-                localVarHeaderParameter["api_key"] = localVarApiKeyValue;
-            }
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Update an existing pet
-         * @throws {RequiredError}
-         */
-        updatePet: function updatePet(body, options) {
-            // verify required parameter 'body' is not null or undefined
-            if (body === null || body === undefined) {
-                throw new RequiredError('body', 'Required parameter body was null or undefined when calling updatePet.');
-            }
-            var localVarPath = "/pet";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'PUT' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            // authentication petstore_auth required
-            // oauth required
-            if (configuration && configuration.accessToken) {
-                var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
-                localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
-            }
-
-            localVarHeaderParameter['Content-Type'] = 'application/json';
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || "";
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Updates a pet in the store with form data
-         * @throws {RequiredError}
-         */
-        updatePetWithForm: function updatePetWithForm(petId, name, status, options) {
-            // verify required parameter 'petId' is not null or undefined
-            if (petId === null || petId === undefined) {
-                throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling updatePetWithForm.');
-            }
-            var localVarPath = "/pet/{petId}".replace("{" + "petId" + "}", encodeURIComponent(String(petId)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-            var localVarFormParams = new FormData();
-
-            // authentication petstore_auth required
-            // oauth required
-            if (configuration && configuration.accessToken) {
-                var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
-                localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
-            }
-
-            if (name !== undefined) {
-                localVarFormParams.set('name', name);
-            }
-
-            if (status !== undefined) {
-                localVarFormParams.set('status', status);
-            }
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            localVarRequestOptions.body = localVarFormParams;
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary uploads an image
-         * @throws {RequiredError}
-         */
-        uploadFile: function uploadFile(petId, additionalMetadata, file, options) {
-            // verify required parameter 'petId' is not null or undefined
-            if (petId === null || petId === undefined) {
-                throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling uploadFile.');
-            }
-            var localVarPath = "/pet/{petId}/uploadImage".replace("{" + "petId" + "}", encodeURIComponent(String(petId)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-            var localVarFormParams = new FormData();
-
-            // authentication petstore_auth required
-            // oauth required
-            if (configuration && configuration.accessToken) {
-                var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
-                localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
-            }
-
-            if (additionalMetadata !== undefined) {
-                localVarFormParams.set('additionalMetadata', additionalMetadata);
-            }
-
-            if (file !== undefined) {
-                localVarFormParams.set('file', file);
-            }
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            localVarRequestOptions.body = localVarFormParams;
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        }
-    };
+  return {
+    /**
+     * 
+     * @summary Add a new pet to the store
+     * @throws {RequiredError}
+     */
+    addPet: function addPet(body, options) {
+      // verify required parameter 'body' is not null or undefined
+      if (body === null || body === undefined) {
+        throw new RequiredError('body', 'Required parameter body was null or undefined when calling addPet.');
+      }
+
+      var localVarPath = "/pet";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'POST'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {}; // authentication petstore_auth required
+      // oauth required
+
+      if (configuration && configuration.accessToken) {
+        var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
+        localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
+      }
+
+      localVarHeaderParameter['Content-Type'] = 'application/json';
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+      localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || "";
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Deletes a pet
+     * @throws {RequiredError}
+     */
+    deletePet: function deletePet(petId, apiKey, options) {
+      // verify required parameter 'petId' is not null or undefined
+      if (petId === null || petId === undefined) {
+        throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling deletePet.');
+      }
+
+      var localVarPath = "/pet/{petId}".replace("{".concat("petId", "}"), encodeURIComponent(String(petId)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'DELETE'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {}; // authentication petstore_auth required
+      // oauth required
+
+      if (configuration && configuration.accessToken) {
+        var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
+        localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
+      }
+
+      if (apiKey !== undefined && apiKey !== null) {
+        localVarHeaderParameter['api_key'] = apiKey;
+      }
+
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * Multiple status values can be provided with comma separated strings
+     * @summary Finds Pets by status
+     * @throws {RequiredError}
+     */
+    findPetsByStatus: function findPetsByStatus(status, options) {
+      // verify required parameter 'status' is not null or undefined
+      if (status === null || status === undefined) {
+        throw new RequiredError('status', 'Required parameter status was null or undefined when calling findPetsByStatus.');
+      }
+
+      var localVarPath = "/pet/findByStatus";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'GET'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {}; // authentication petstore_auth required
+      // oauth required
+
+      if (configuration && configuration.accessToken) {
+        var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
+        localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
+      }
+
+      if (status) {
+        localVarQueryParameter['status'] = status.join(COLLECTION_FORMATS["csv"]);
+      }
+
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+     * @summary Finds Pets by tags
+     * @throws {RequiredError}
+     */
+    findPetsByTags: function findPetsByTags(tags, options) {
+      // verify required parameter 'tags' is not null or undefined
+      if (tags === null || tags === undefined) {
+        throw new RequiredError('tags', 'Required parameter tags was null or undefined when calling findPetsByTags.');
+      }
+
+      var localVarPath = "/pet/findByTags";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'GET'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {}; // authentication petstore_auth required
+      // oauth required
+
+      if (configuration && configuration.accessToken) {
+        var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
+        localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
+      }
+
+      if (tags) {
+        localVarQueryParameter['tags'] = tags.join(COLLECTION_FORMATS["csv"]);
+      }
+
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * Returns a single pet
+     * @summary Find pet by ID
+     * @throws {RequiredError}
+     */
+    getPetById: function getPetById(petId, options) {
+      // verify required parameter 'petId' is not null or undefined
+      if (petId === null || petId === undefined) {
+        throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling getPetById.');
+      }
+
+      var localVarPath = "/pet/{petId}".replace("{".concat("petId", "}"), encodeURIComponent(String(petId)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'GET'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {}; // authentication api_key required
+
+      if (configuration && configuration.apiKey) {
+        var localVarApiKeyValue = typeof configuration.apiKey === 'function' ? configuration.apiKey("api_key") : configuration.apiKey;
+        localVarHeaderParameter["api_key"] = localVarApiKeyValue;
+      }
+
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Update an existing pet
+     * @throws {RequiredError}
+     */
+    updatePet: function updatePet(body, options) {
+      // verify required parameter 'body' is not null or undefined
+      if (body === null || body === undefined) {
+        throw new RequiredError('body', 'Required parameter body was null or undefined when calling updatePet.');
+      }
+
+      var localVarPath = "/pet";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'PUT'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {}; // authentication petstore_auth required
+      // oauth required
+
+      if (configuration && configuration.accessToken) {
+        var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
+        localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
+      }
+
+      localVarHeaderParameter['Content-Type'] = 'application/json';
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+      localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || "";
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Updates a pet in the store with form data
+     * @throws {RequiredError}
+     */
+    updatePetWithForm: function updatePetWithForm(petId, name, status, options) {
+      // verify required parameter 'petId' is not null or undefined
+      if (petId === null || petId === undefined) {
+        throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling updatePetWithForm.');
+      }
+
+      var localVarPath = "/pet/{petId}".replace("{".concat("petId", "}"), encodeURIComponent(String(petId)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'POST'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      var localVarFormParams = new FormData(); // authentication petstore_auth required
+      // oauth required
+
+      if (configuration && configuration.accessToken) {
+        var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
+        localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
+      }
+
+      if (name !== undefined) {
+        localVarFormParams.set('name', name);
+      }
+
+      if (status !== undefined) {
+        localVarFormParams.set('status', status);
+      }
+
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      localVarRequestOptions.body = localVarFormParams;
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary uploads an image
+     * @throws {RequiredError}
+     */
+    uploadFile: function uploadFile(petId, additionalMetadata, file, options) {
+      // verify required parameter 'petId' is not null or undefined
+      if (petId === null || petId === undefined) {
+        throw new RequiredError('petId', 'Required parameter petId was null or undefined when calling uploadFile.');
+      }
+
+      var localVarPath = "/pet/{petId}/uploadImage".replace("{".concat("petId", "}"), encodeURIComponent(String(petId)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'POST'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      var localVarFormParams = new FormData(); // authentication petstore_auth required
+      // oauth required
+
+      if (configuration && configuration.accessToken) {
+        var localVarAccessTokenValue = typeof configuration.accessToken === 'function' ? configuration.accessToken("petstore_auth", ["write:pets", "read:pets"]) : configuration.accessToken;
+        localVarHeaderParameter["Authorization"] = "Bearer " + localVarAccessTokenValue;
+      }
+
+      if (additionalMetadata !== undefined) {
+        localVarFormParams.set('additionalMetadata', additionalMetadata);
+      }
+
+      if (file !== undefined) {
+        localVarFormParams.set('file', file);
+      }
+
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      localVarRequestOptions.body = localVarFormParams;
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    }
+  };
 };
 
 /**
@@ -429,276 +393,269 @@ export var PetApiFetchParamCreator = function PetApiFetchParamCreator(configurat
  * @export
  */
 export var PetApi = function PetApi(configuration) {
-    var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch;
-
-    var basePath = configuration && configuration.basePath || BASE_PATH;
-    return {
-        /**
-         * 
-         * @summary Add a new pet to the store
-         * @throws {RequiredError}
-         */
-        addPet: function addPet(body) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = PetApiFetchParamCreator(configuration).addPet(body, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Deletes a pet
-         * @throws {RequiredError}
-         */
-        deletePet: function deletePet(petId, apiKey) {
-            var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
-            var localVarFetchArgs = PetApiFetchParamCreator(configuration).deletePet(petId, apiKey, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * Multiple status values can be provided with comma separated strings
-         * @summary Finds Pets by status
-         * @throws {RequiredError}
-         */
-        findPetsByStatus: function findPetsByStatus(status) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = PetApiFetchParamCreator(configuration).findPetsByStatus(status, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
-         * @summary Finds Pets by tags
-         * @throws {RequiredError}
-         */
-        findPetsByTags: function findPetsByTags(tags) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = PetApiFetchParamCreator(configuration).findPetsByTags(tags, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * Returns a single pet
-         * @summary Find pet by ID
-         * @throws {RequiredError}
-         */
-        getPetById: function getPetById(petId) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = PetApiFetchParamCreator(configuration).getPetById(petId, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Update an existing pet
-         * @throws {RequiredError}
-         */
-        updatePet: function updatePet(body) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = PetApiFetchParamCreator(configuration).updatePet(body, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Updates a pet in the store with form data
-         * @throws {RequiredError}
-         */
-        updatePetWithForm: function updatePetWithForm(petId, name, status) {
-            var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
-
-            var localVarFetchArgs = PetApiFetchParamCreator(configuration).updatePetWithForm(petId, name, status, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary uploads an image
-         * @throws {RequiredError}
-         */
-        uploadFile: function uploadFile(petId, additionalMetadata, file) {
-            var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
-
-            var localVarFetchArgs = PetApiFetchParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
+  var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch;
+  var basePath = configuration && configuration.basePath || BASE_PATH;
+  return {
+    /**
+     * 
+     * @summary Add a new pet to the store
+     * @throws {RequiredError}
+     */
+    addPet: function addPet(body) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = PetApiFetchParamCreator(configuration).addPet(body, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
         }
-    };
+      });
+    },
+
+    /**
+     * 
+     * @summary Deletes a pet
+     * @throws {RequiredError}
+     */
+    deletePet: function deletePet(petId, apiKey) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      var localVarFetchArgs = PetApiFetchParamCreator(configuration).deletePet(petId, apiKey, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * Multiple status values can be provided with comma separated strings
+     * @summary Finds Pets by status
+     * @throws {RequiredError}
+     */
+    findPetsByStatus: function findPetsByStatus(status) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = PetApiFetchParamCreator(configuration).findPetsByStatus(status, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+     * @summary Finds Pets by tags
+     * @throws {RequiredError}
+     */
+    findPetsByTags: function findPetsByTags(tags) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = PetApiFetchParamCreator(configuration).findPetsByTags(tags, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * Returns a single pet
+     * @summary Find pet by ID
+     * @throws {RequiredError}
+     */
+    getPetById: function getPetById(petId) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = PetApiFetchParamCreator(configuration).getPetById(petId, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * 
+     * @summary Update an existing pet
+     * @throws {RequiredError}
+     */
+    updatePet: function updatePet(body) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = PetApiFetchParamCreator(configuration).updatePet(body, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * 
+     * @summary Updates a pet in the store with form data
+     * @throws {RequiredError}
+     */
+    updatePetWithForm: function updatePetWithForm(petId, name, status) {
+      var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+      var localVarFetchArgs = PetApiFetchParamCreator(configuration).updatePetWithForm(petId, name, status, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * 
+     * @summary uploads an image
+     * @throws {RequiredError}
+     */
+    uploadFile: function uploadFile(petId, additionalMetadata, file) {
+      var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
+      var localVarFetchArgs = PetApiFetchParamCreator(configuration).uploadFile(petId, additionalMetadata, file, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
+        }
+      });
+    }
+  };
 };
-
 /**
  * StoreApi - fetch parameter creator
  * @export
  */
+
 export var StoreApiFetchParamCreator = function StoreApiFetchParamCreator(configuration) {
-    return {
-        /**
-         * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
-         * @summary Delete purchase order by ID
-         * @throws {RequiredError}
-         */
-        deleteOrder: function deleteOrder(orderId, options) {
-            // verify required parameter 'orderId' is not null or undefined
-            if (orderId === null || orderId === undefined) {
-                throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling deleteOrder.');
-            }
-            var localVarPath = "/store/order/{orderId}".replace("{" + "orderId" + "}", encodeURIComponent(String(orderId)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'DELETE' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * Returns a map of status codes to quantities
-         * @summary Returns pet inventories by status
-         * @throws {RequiredError}
-         */
-        getInventory: function getInventory(options) {
-            var localVarPath = "/store/inventory";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            // authentication api_key required
-            if (configuration && configuration.apiKey) {
-                var localVarApiKeyValue = typeof configuration.apiKey === 'function' ? configuration.apiKey("api_key") : configuration.apiKey;
-                localVarHeaderParameter["api_key"] = localVarApiKeyValue;
-            }
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
-         * @summary Find purchase order by ID
-         * @throws {RequiredError}
-         */
-        getOrderById: function getOrderById(orderId, options) {
-            // verify required parameter 'orderId' is not null or undefined
-            if (orderId === null || orderId === undefined) {
-                throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling getOrderById.');
-            }
-            var localVarPath = "/store/order/{orderId}".replace("{" + "orderId" + "}", encodeURIComponent(String(orderId)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Place an order for a pet
-         * @throws {RequiredError}
-         */
-        placeOrder: function placeOrder(body, options) {
-            // verify required parameter 'body' is not null or undefined
-            if (body === null || body === undefined) {
-                throw new RequiredError('body', 'Required parameter body was null or undefined when calling placeOrder.');
-            }
-            var localVarPath = "/store/order";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarHeaderParameter['Content-Type'] = 'application/json';
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || "";
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        }
-    };
+  return {
+    /**
+     * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+     * @summary Delete purchase order by ID
+     * @throws {RequiredError}
+     */
+    deleteOrder: function deleteOrder(orderId, options) {
+      // verify required parameter 'orderId' is not null or undefined
+      if (orderId === null || orderId === undefined) {
+        throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling deleteOrder.');
+      }
+
+      var localVarPath = "/store/order/{orderId}".replace("{".concat("orderId", "}"), encodeURIComponent(String(orderId)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'DELETE'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * Returns a map of status codes to quantities
+     * @summary Returns pet inventories by status
+     * @throws {RequiredError}
+     */
+    getInventory: function getInventory(options) {
+      var localVarPath = "/store/inventory";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'GET'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {}; // authentication api_key required
+
+      if (configuration && configuration.apiKey) {
+        var localVarApiKeyValue = typeof configuration.apiKey === 'function' ? configuration.apiKey("api_key") : configuration.apiKey;
+        localVarHeaderParameter["api_key"] = localVarApiKeyValue;
+      }
+
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+     * @summary Find purchase order by ID
+     * @throws {RequiredError}
+     */
+    getOrderById: function getOrderById(orderId, options) {
+      // verify required parameter 'orderId' is not null or undefined
+      if (orderId === null || orderId === undefined) {
+        throw new RequiredError('orderId', 'Required parameter orderId was null or undefined when calling getOrderById.');
+      }
+
+      var localVarPath = "/store/order/{orderId}".replace("{".concat("orderId", "}"), encodeURIComponent(String(orderId)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'GET'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Place an order for a pet
+     * @throws {RequiredError}
+     */
+    placeOrder: function placeOrder(body, options) {
+      // verify required parameter 'body' is not null or undefined
+      if (body === null || body === undefined) {
+        throw new RequiredError('body', 'Required parameter body was null or undefined when calling placeOrder.');
+      }
+
+      var localVarPath = "/store/order";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'POST'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarHeaderParameter['Content-Type'] = 'application/json';
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+      localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || "";
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    }
+  };
 };
 
 /**
@@ -706,334 +663,335 @@ export var StoreApiFetchParamCreator = function StoreApiFetchParamCreator(config
  * @export
  */
 export var StoreApi = function StoreApi(configuration) {
-    var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch;
-
-    var basePath = configuration && configuration.basePath || BASE_PATH;
-    return {
-        /**
-         * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
-         * @summary Delete purchase order by ID
-         * @throws {RequiredError}
-         */
-        deleteOrder: function deleteOrder(orderId) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = StoreApiFetchParamCreator(configuration).deleteOrder(orderId, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * Returns a map of status codes to quantities
-         * @summary Returns pet inventories by status
-         * @throws {RequiredError}
-         */
-        getInventory: function getInventory() {
-            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
-            var localVarFetchArgs = StoreApiFetchParamCreator(configuration).getInventory(options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
-         * @summary Find purchase order by ID
-         * @throws {RequiredError}
-         */
-        getOrderById: function getOrderById(orderId) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = StoreApiFetchParamCreator(configuration).getOrderById(orderId, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Place an order for a pet
-         * @throws {RequiredError}
-         */
-        placeOrder: function placeOrder(body) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = StoreApiFetchParamCreator(configuration).placeOrder(body, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
+  var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch;
+  var basePath = configuration && configuration.basePath || BASE_PATH;
+  return {
+    /**
+     * For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+     * @summary Delete purchase order by ID
+     * @throws {RequiredError}
+     */
+    deleteOrder: function deleteOrder(orderId) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = StoreApiFetchParamCreator(configuration).deleteOrder(orderId, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * Returns a map of status codes to quantities
+     * @summary Returns pet inventories by status
+     * @throws {RequiredError}
+     */
+    getInventory: function getInventory() {
+      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+      var localVarFetchArgs = StoreApiFetchParamCreator(configuration).getInventory(options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+     * @summary Find purchase order by ID
+     * @throws {RequiredError}
+     */
+    getOrderById: function getOrderById(orderId) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = StoreApiFetchParamCreator(configuration).getOrderById(orderId, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
         }
-    };
+      });
+    },
+
+    /**
+     * 
+     * @summary Place an order for a pet
+     * @throws {RequiredError}
+     */
+    placeOrder: function placeOrder(body) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = StoreApiFetchParamCreator(configuration).placeOrder(body, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
+        }
+      });
+    }
+  };
 };
-
 /**
  * UserApi - fetch parameter creator
  * @export
  */
+
 export var UserApiFetchParamCreator = function UserApiFetchParamCreator(configuration) {
-    return {
-        /**
-         * This can only be done by the logged in user.
-         * @summary Create user
-         * @throws {RequiredError}
-         */
-        createUser: function createUser(body, options) {
-            // verify required parameter 'body' is not null or undefined
-            if (body === null || body === undefined) {
-                throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUser.');
-            }
-            var localVarPath = "/user";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarHeaderParameter['Content-Type'] = 'application/json';
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || "";
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Creates list of users with given input array
-         * @throws {RequiredError}
-         */
-        createUsersWithArrayInput: function createUsersWithArrayInput(body, options) {
-            // verify required parameter 'body' is not null or undefined
-            if (body === null || body === undefined) {
-                throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUsersWithArrayInput.');
-            }
-            var localVarPath = "/user/createWithArray";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarHeaderParameter['Content-Type'] = 'application/json';
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || "";
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Creates list of users with given input array
-         * @throws {RequiredError}
-         */
-        createUsersWithListInput: function createUsersWithListInput(body, options) {
-            // verify required parameter 'body' is not null or undefined
-            if (body === null || body === undefined) {
-                throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUsersWithListInput.');
-            }
-            var localVarPath = "/user/createWithList";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'POST' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarHeaderParameter['Content-Type'] = 'application/json';
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || "";
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * This can only be done by the logged in user.
-         * @summary Delete user
-         * @throws {RequiredError}
-         */
-        deleteUser: function deleteUser(username, options) {
-            // verify required parameter 'username' is not null or undefined
-            if (username === null || username === undefined) {
-                throw new RequiredError('username', 'Required parameter username was null or undefined when calling deleteUser.');
-            }
-            var localVarPath = "/user/{username}".replace("{" + "username" + "}", encodeURIComponent(String(username)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'DELETE' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Get user by user name
-         * @throws {RequiredError}
-         */
-        getUserByName: function getUserByName(username, options) {
-            // verify required parameter 'username' is not null or undefined
-            if (username === null || username === undefined) {
-                throw new RequiredError('username', 'Required parameter username was null or undefined when calling getUserByName.');
-            }
-            var localVarPath = "/user/{username}".replace("{" + "username" + "}", encodeURIComponent(String(username)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Logs user into the system
-         * @throws {RequiredError}
-         */
-        loginUser: function loginUser(username, password, options) {
-            // verify required parameter 'username' is not null or undefined
-            if (username === null || username === undefined) {
-                throw new RequiredError('username', 'Required parameter username was null or undefined when calling loginUser.');
-            }
-            // verify required parameter 'password' is not null or undefined
-            if (password === null || password === undefined) {
-                throw new RequiredError('password', 'Required parameter password was null or undefined when calling loginUser.');
-            }
-            var localVarPath = "/user/login";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            if (username !== undefined) {
-                localVarQueryParameter['username'] = username;
-            }
-
-            if (password !== undefined) {
-                localVarQueryParameter['password'] = password;
-            }
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * 
-         * @summary Logs out current logged in user session
-         * @throws {RequiredError}
-         */
-        logoutUser: function logoutUser(options) {
-            var localVarPath = "/user/logout";
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'GET' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        },
-
-        /**
-         * This can only be done by the logged in user.
-         * @summary Updated user
-         * @throws {RequiredError}
-         */
-        updateUser: function updateUser(username, body, options) {
-            // verify required parameter 'username' is not null or undefined
-            if (username === null || username === undefined) {
-                throw new RequiredError('username', 'Required parameter username was null or undefined when calling updateUser.');
-            }
-            // verify required parameter 'body' is not null or undefined
-            if (body === null || body === undefined) {
-                throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateUser.');
-            }
-            var localVarPath = "/user/{username}".replace("{" + "username" + "}", encodeURIComponent(String(username)));
-            var localVarUrlObj = url.parse(localVarPath, true);
-            var localVarRequestOptions = Object.assign({}, { method: 'PUT' }, options);
-            var localVarHeaderParameter = {};
-            var localVarQueryParameter = {};
-
-            localVarHeaderParameter['Content-Type'] = 'application/json';
-
-            localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
-            // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
-            delete localVarUrlObj.search;
-            localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
-            var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body = needsSerialization ? JSON.stringify(body || {}) : body || "";
-
-            return {
-                url: url.format(localVarUrlObj),
-                options: localVarRequestOptions
-            };
-        }
-    };
+  return {
+    /**
+     * This can only be done by the logged in user.
+     * @summary Create user
+     * @throws {RequiredError}
+     */
+    createUser: function createUser(body, options) {
+      // verify required parameter 'body' is not null or undefined
+      if (body === null || body === undefined) {
+        throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUser.');
+      }
+
+      var localVarPath = "/user";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'POST'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarHeaderParameter['Content-Type'] = 'application/json';
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+      localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || "";
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Creates list of users with given input array
+     * @throws {RequiredError}
+     */
+    createUsersWithArrayInput: function createUsersWithArrayInput(body, options) {
+      // verify required parameter 'body' is not null or undefined
+      if (body === null || body === undefined) {
+        throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUsersWithArrayInput.');
+      }
+
+      var localVarPath = "/user/createWithArray";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'POST'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarHeaderParameter['Content-Type'] = 'application/json';
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+      localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || "";
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Creates list of users with given input array
+     * @throws {RequiredError}
+     */
+    createUsersWithListInput: function createUsersWithListInput(body, options) {
+      // verify required parameter 'body' is not null or undefined
+      if (body === null || body === undefined) {
+        throw new RequiredError('body', 'Required parameter body was null or undefined when calling createUsersWithListInput.');
+      }
+
+      var localVarPath = "/user/createWithList";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'POST'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarHeaderParameter['Content-Type'] = 'application/json';
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+      localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || "";
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * This can only be done by the logged in user.
+     * @summary Delete user
+     * @throws {RequiredError}
+     */
+    deleteUser: function deleteUser(username, options) {
+      // verify required parameter 'username' is not null or undefined
+      if (username === null || username === undefined) {
+        throw new RequiredError('username', 'Required parameter username was null or undefined when calling deleteUser.');
+      }
+
+      var localVarPath = "/user/{username}".replace("{".concat("username", "}"), encodeURIComponent(String(username)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'DELETE'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Get user by user name
+     * @throws {RequiredError}
+     */
+    getUserByName: function getUserByName(username, options) {
+      // verify required parameter 'username' is not null or undefined
+      if (username === null || username === undefined) {
+        throw new RequiredError('username', 'Required parameter username was null or undefined when calling getUserByName.');
+      }
+
+      var localVarPath = "/user/{username}".replace("{".concat("username", "}"), encodeURIComponent(String(username)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'GET'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Logs user into the system
+     * @throws {RequiredError}
+     */
+    loginUser: function loginUser(username, password, options) {
+      // verify required parameter 'username' is not null or undefined
+      if (username === null || username === undefined) {
+        throw new RequiredError('username', 'Required parameter username was null or undefined when calling loginUser.');
+      } // verify required parameter 'password' is not null or undefined
+
+
+      if (password === null || password === undefined) {
+        throw new RequiredError('password', 'Required parameter password was null or undefined when calling loginUser.');
+      }
+
+      var localVarPath = "/user/login";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'GET'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+
+      if (username !== undefined) {
+        localVarQueryParameter['username'] = username;
+      }
+
+      if (password !== undefined) {
+        localVarQueryParameter['password'] = password;
+      }
+
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * 
+     * @summary Logs out current logged in user session
+     * @throws {RequiredError}
+     */
+    logoutUser: function logoutUser(options) {
+      var localVarPath = "/user/logout";
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'GET'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    },
+
+    /**
+     * This can only be done by the logged in user.
+     * @summary Updated user
+     * @throws {RequiredError}
+     */
+    updateUser: function updateUser(username, body, options) {
+      // verify required parameter 'username' is not null or undefined
+      if (username === null || username === undefined) {
+        throw new RequiredError('username', 'Required parameter username was null or undefined when calling updateUser.');
+      } // verify required parameter 'body' is not null or undefined
+
+
+      if (body === null || body === undefined) {
+        throw new RequiredError('body', 'Required parameter body was null or undefined when calling updateUser.');
+      }
+
+      var localVarPath = "/user/{username}".replace("{".concat("username", "}"), encodeURIComponent(String(username)));
+      var localVarUrlObj = url.parse(localVarPath, true);
+      var localVarRequestOptions = Object.assign({}, {
+        method: 'PUT'
+      }, options);
+      var localVarHeaderParameter = {};
+      var localVarQueryParameter = {};
+      localVarHeaderParameter['Content-Type'] = 'application/json';
+      localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query); // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
+
+      delete localVarUrlObj.search;
+      localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
+      var needsSerialization = typeof body !== "string" || localVarRequestOptions.headers['Content-Type'] === 'application/json';
+      localVarRequestOptions.body = needsSerialization ? JSON.stringify(body != null ? body : {}) : body || "";
+      return {
+        url: url.format(localVarUrlObj),
+        options: localVarRequestOptions
+      };
+    }
+  };
 };
 
 /**
@@ -1041,152 +999,143 @@ export var UserApiFetchParamCreator = function UserApiFetchParamCreator(configur
  * @export
  */
 export var UserApi = function UserApi(configuration) {
-    var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch;
-
-    var basePath = configuration && configuration.basePath || BASE_PATH;
-    return {
-        /**
-         * This can only be done by the logged in user.
-         * @summary Create user
-         * @throws {RequiredError}
-         */
-        createUser: function createUser(body) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUser(body, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Creates list of users with given input array
-         * @throws {RequiredError}
-         */
-        createUsersWithArrayInput: function createUsersWithArrayInput(body) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUsersWithArrayInput(body, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Creates list of users with given input array
-         * @throws {RequiredError}
-         */
-        createUsersWithListInput: function createUsersWithListInput(body) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUsersWithListInput(body, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * This can only be done by the logged in user.
-         * @summary Delete user
-         * @throws {RequiredError}
-         */
-        deleteUser: function deleteUser(username) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = UserApiFetchParamCreator(configuration).deleteUser(username, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Get user by user name
-         * @throws {RequiredError}
-         */
-        getUserByName: function getUserByName(username) {
-            var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
-
-            var localVarFetchArgs = UserApiFetchParamCreator(configuration).getUserByName(username, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Logs user into the system
-         * @throws {RequiredError}
-         */
-        loginUser: function loginUser(username, password) {
-            var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
-            var localVarFetchArgs = UserApiFetchParamCreator(configuration).loginUser(username, password, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response.json();
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * 
-         * @summary Logs out current logged in user session
-         * @throws {RequiredError}
-         */
-        logoutUser: function logoutUser() {
-            var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
-            var localVarFetchArgs = UserApiFetchParamCreator(configuration).logoutUser(options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
-        },
-
-        /**
-         * This can only be done by the logged in user.
-         * @summary Updated user
-         * @throws {RequiredError}
-         */
-        updateUser: function updateUser(username, body) {
-            var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
-
-            var localVarFetchArgs = UserApiFetchParamCreator(configuration).updateUser(username, body, options);
-            return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
-                if (response.status >= 200 && response.status < 300) {
-                    return response;
-                } else {
-                    throw response;
-                }
-            });
+  var fetch = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : portableFetch;
+  var basePath = configuration && configuration.basePath || BASE_PATH;
+  return {
+    /**
+     * This can only be done by the logged in user.
+     * @summary Create user
+     * @throws {RequiredError}
+     */
+    createUser: function createUser(body) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUser(body, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * 
+     * @summary Creates list of users with given input array
+     * @throws {RequiredError}
+     */
+    createUsersWithArrayInput: function createUsersWithArrayInput(body) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUsersWithArrayInput(body, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * 
+     * @summary Creates list of users with given input array
+     * @throws {RequiredError}
+     */
+    createUsersWithListInput: function createUsersWithListInput(body) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = UserApiFetchParamCreator(configuration).createUsersWithListInput(body, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * This can only be done by the logged in user.
+     * @summary Delete user
+     * @throws {RequiredError}
+     */
+    deleteUser: function deleteUser(username) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = UserApiFetchParamCreator(configuration).deleteUser(username, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * 
+     * @summary Get user by user name
+     * @throws {RequiredError}
+     */
+    getUserByName: function getUserByName(username) {
+      var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
+      var localVarFetchArgs = UserApiFetchParamCreator(configuration).getUserByName(username, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
         }
-    };
+      });
+    },
+
+    /**
+     * 
+     * @summary Logs user into the system
+     * @throws {RequiredError}
+     */
+    loginUser: function loginUser(username, password) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      var localVarFetchArgs = UserApiFetchParamCreator(configuration).loginUser(username, password, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response.json();
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * 
+     * @summary Logs out current logged in user session
+     * @throws {RequiredError}
+     */
+    logoutUser: function logoutUser() {
+      var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+      var localVarFetchArgs = UserApiFetchParamCreator(configuration).logoutUser(options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    },
+
+    /**
+     * This can only be done by the logged in user.
+     * @summary Updated user
+     * @throws {RequiredError}
+     */
+    updateUser: function updateUser(username, body) {
+      var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
+      var localVarFetchArgs = UserApiFetchParamCreator(configuration).updateUser(username, body, options);
+      return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
+        if (response.status >= 200 && response.status < 300) {
+          return response;
+        } else {
+          throw response;
+        }
+      });
+    }
+  };
 };
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-flowtyped/lib/api.js.flow b/samples/client/petstore/javascript-flowtyped/lib/api.js.flow
index cd921bbc237..bc4367b6dfc 100644
--- a/samples/client/petstore/javascript-flowtyped/lib/api.js.flow
+++ b/samples/client/petstore/javascript-flowtyped/lib/api.js.flow
@@ -4,7 +4,7 @@
  * OpenAPI Petstore
  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
  *
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
  *
  * NOTE: This class is auto generated by OpenAPI-Generator
  * https://openapi-generator.tech
@@ -323,7 +323,7 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
             delete localVarUrlObj.search;
             localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
             const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || "");
+            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || "");
 
             return {
                 url: url.format(localVarUrlObj),
@@ -515,7 +515,7 @@ export const PetApiFetchParamCreator = function (configuration?: Configuration)
             delete localVarUrlObj.search;
             localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
             const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || "");
+            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || "");
 
             return {
                 url: url.format(localVarUrlObj),
@@ -878,7 +878,7 @@ export const StoreApiFetchParamCreator = function (configuration?: Configuration
             delete localVarUrlObj.search;
             localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
             const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || "");
+            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || "");
 
             return {
                 url: url.format(localVarUrlObj),
@@ -997,7 +997,7 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration)
             delete localVarUrlObj.search;
             localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
             const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || "");
+            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || "");
 
             return {
                 url: url.format(localVarUrlObj),
@@ -1027,7 +1027,7 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration)
             delete localVarUrlObj.search;
             localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
             const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || "");
+            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || "");
 
             return {
                 url: url.format(localVarUrlObj),
@@ -1057,7 +1057,7 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration)
             delete localVarUrlObj.search;
             localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
             const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || "");
+            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || "");
 
             return {
                 url: url.format(localVarUrlObj),
@@ -1206,7 +1206,7 @@ export const UserApiFetchParamCreator = function (configuration?: Configuration)
             delete localVarUrlObj.search;
             localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
             const needsSerialization = (typeof body !== "string") || localVarRequestOptions.headers['Content-Type'] === 'application/json';
-            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body || {}) : (((body:any):string) || "");
+            localVarRequestOptions.body =  needsSerialization ? JSON.stringify(body != null ? body : {}) : (((body:any):string) || "");
 
             return {
                 url: url.format(localVarUrlObj),
diff --git a/samples/client/petstore/javascript-flowtyped/lib/configuration.js b/samples/client/petstore/javascript-flowtyped/lib/configuration.js
index 4d6e700a54d..f1670e52540 100644
--- a/samples/client/petstore/javascript-flowtyped/lib/configuration.js
+++ b/samples/client/petstore/javascript-flowtyped/lib/configuration.js
@@ -1,10 +1,19 @@
-function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
+import _classCallCheck from "/Users/akihito1/src/github.com/ackintosh/openapi-generator-1/samples/client/petstore/javascript-flowtyped/node_modules/@babel/runtime/helpers/esm/classCallCheck";
 
+/**
+ * OpenAPI Petstore
+ * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
+ *
+ * The version of the OpenAPI document: 1.0.0
+ *
+ * NOTE: This class is auto generated by OpenAPI-Generator
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
 export var Configuration =
 /**
- * parameter for oauth2 security
+ * parameter for apiKey security
  * @param name security name
- * @param scopes oauth2 scope
  * @memberof Configuration
  */
 
@@ -14,33 +23,6 @@ export var Configuration =
  * @type {string}
  * @memberof Configuration
  */
-function Configuration() {
-    var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
-
-    _classCallCheck(this, Configuration);
-
-    if (param.apiKey) {
-        this.apiKey = param.apiKey;
-    }
-    if (param.username) {
-        this.username = param.username;
-    }
-    if (param.password) {
-        this.password = param.password;
-    }
-    if (param.accessToken) {
-        this.accessToken = param.accessToken;
-    }
-    if (param.basePath) {
-        this.basePath = param.basePath;
-    }
-}
-/**
- * override base path
- *
- * @type {string}
- * @memberof Configuration
- */
 
 /**
  * parameter for basic security
@@ -50,18 +32,40 @@ function Configuration() {
  */
 
 /**
- * parameter for apiKey security
+ * parameter for oauth2 security
  * @param name security name
+ * @param scopes oauth2 scope
  * @memberof Configuration
  */
-;
+
 /**
- * OpenAPI Petstore
- * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
- *
- * OpenAPI spec version: 1.0.0
+ * override base path
  *
- * NOTE: This class is auto generated by OpenAPI-Generator
- * https://openapi-generator.tech
- * Do not edit the class manually.
- */
\ No newline at end of file
+ * @type {string}
+ * @memberof Configuration
+ */
+function Configuration() {
+  var param = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
+
+  _classCallCheck(this, Configuration);
+
+  if (param.apiKey) {
+    this.apiKey = param.apiKey;
+  }
+
+  if (param.username) {
+    this.username = param.username;
+  }
+
+  if (param.password) {
+    this.password = param.password;
+  }
+
+  if (param.accessToken) {
+    this.accessToken = param.accessToken;
+  }
+
+  if (param.basePath) {
+    this.basePath = param.basePath;
+  }
+};
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-flowtyped/lib/configuration.js.flow b/samples/client/petstore/javascript-flowtyped/lib/configuration.js.flow
index e2717b94012..690f033dd1d 100644
--- a/samples/client/petstore/javascript-flowtyped/lib/configuration.js.flow
+++ b/samples/client/petstore/javascript-flowtyped/lib/configuration.js.flow
@@ -3,7 +3,7 @@
  * OpenAPI Petstore
  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
  *
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
  *
  * NOTE: This class is auto generated by OpenAPI-Generator
  * https://openapi-generator.tech
diff --git a/samples/client/petstore/javascript-flowtyped/lib/index.js b/samples/client/petstore/javascript-flowtyped/lib/index.js
index 0460f725d97..cc9361b86e8 100644
--- a/samples/client/petstore/javascript-flowtyped/lib/index.js
+++ b/samples/client/petstore/javascript-flowtyped/lib/index.js
@@ -1,14 +1,12 @@
-
 /**
  * OpenAPI Petstore
  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
  *
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
  *
  * NOTE: This class is auto generated by OpenAPI-Generator
  * https://openapi-generator.tech
  * Do not edit the class manually.
  */
-
 export * from "./api";
 export * from "./configuration";
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-flowtyped/lib/index.js.flow b/samples/client/petstore/javascript-flowtyped/lib/index.js.flow
index fc756135245..9864e99fec2 100644
--- a/samples/client/petstore/javascript-flowtyped/lib/index.js.flow
+++ b/samples/client/petstore/javascript-flowtyped/lib/index.js.flow
@@ -3,7 +3,7 @@
  * OpenAPI Petstore
  * This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
  *
- * OpenAPI spec version: 1.0.0
+ * The version of the OpenAPI document: 1.0.0
  *
  * NOTE: This class is auto generated by OpenAPI-Generator
  * https://openapi-generator.tech
-- 
GitLab