Update JS petstore with OAS2, fix example values (#168)

* restore js petstore from codegen 2x

* update js petstore with oas2, fix example values

* remove comment code in js generator
This commit is contained in:
William Cheng
2018-04-21 11:49:02 +08:00
committed by GitHub
parent 93bf3d91ea
commit fdeca629bb
55 changed files with 557 additions and 494 deletions

View File

@@ -8,7 +8,7 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.0-SNAPSHOT
* Swagger Codegen version: 3.0.0-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -59,16 +59,16 @@
/**
* To test special tags
* To test special tags
* @param {module:model/Client} body client model
* @param {module:model/Client} client client model
* @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
this.testSpecialTags = function(body, callback) {
var postBody = body;
this.testSpecialTags = function(client, callback) {
var postBody = client;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testSpecialTags");
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
}

View File

@@ -8,7 +8,7 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.0-SNAPSHOT
* Swagger Codegen version: 3.0.0-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -17,18 +17,18 @@
(function(root, factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['ApiClient', 'model/Client', 'model/OuterBoolean', 'model/OuterComposite', 'model/OuterNumber', 'model/OuterString'], factory);
define(['ApiClient', 'model/Client', 'model/OuterBoolean', 'model/OuterComposite', 'model/OuterNumber', 'model/OuterString', 'model/User'], factory);
} else if (typeof module === 'object' && module.exports) {
// CommonJS-like environments that support module.exports, like Node.
module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/OuterBoolean'), require('../model/OuterComposite'), require('../model/OuterNumber'), require('../model/OuterString'));
module.exports = factory(require('../ApiClient'), require('../model/Client'), require('../model/OuterBoolean'), require('../model/OuterComposite'), require('../model/OuterNumber'), require('../model/OuterString'), require('../model/User'));
} else {
// Browser globals (root is window)
if (!root.SwaggerPetstore) {
root.SwaggerPetstore = {};
}
root.SwaggerPetstore.FakeApi = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Client, root.SwaggerPetstore.OuterBoolean, root.SwaggerPetstore.OuterComposite, root.SwaggerPetstore.OuterNumber, root.SwaggerPetstore.OuterString);
root.SwaggerPetstore.FakeApi = factory(root.SwaggerPetstore.ApiClient, root.SwaggerPetstore.Client, root.SwaggerPetstore.OuterBoolean, root.SwaggerPetstore.OuterComposite, root.SwaggerPetstore.OuterNumber, root.SwaggerPetstore.OuterString, root.SwaggerPetstore.User);
}
}(this, function(ApiClient, Client, OuterBoolean, OuterComposite, OuterNumber, OuterString) {
}(this, function(ApiClient, Client, OuterBoolean, OuterComposite, OuterNumber, OuterString, User) {
'use strict';
/**
@@ -59,13 +59,13 @@
/**
* Test serialization of outer boolean types
* @param {Object} opts Optional parameters
* @param {module:model/OuterBoolean} opts.body Input boolean as post body
* @param {Boolean} opts.booleanPostBody Input boolean as post body
* @param {module:api/FakeApi~fakeOuterBooleanSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OuterBoolean}
*/
this.fakeOuterBooleanSerialize = function(opts, callback) {
opts = opts || {};
var postBody = opts['body'];
var postBody = opts['booleanPostBody'];
var pathParams = {
@@ -81,7 +81,7 @@
var authNames = [];
var contentTypes = [];
var accepts = [];
var accepts = ['*/*'];
var returnType = OuterBoolean;
return this.apiClient.callApi(
@@ -102,13 +102,13 @@
/**
* Test serialization of object with outer number type
* @param {Object} opts Optional parameters
* @param {module:model/OuterComposite} opts.body Input composite as post body
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
* @param {module:api/FakeApi~fakeOuterCompositeSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OuterComposite}
*/
this.fakeOuterCompositeSerialize = function(opts, callback) {
opts = opts || {};
var postBody = opts['body'];
var postBody = opts['outerComposite'];
var pathParams = {
@@ -124,7 +124,7 @@
var authNames = [];
var contentTypes = [];
var accepts = [];
var accepts = ['*/*'];
var returnType = OuterComposite;
return this.apiClient.callApi(
@@ -145,7 +145,7 @@
/**
* Test serialization of outer number types
* @param {Object} opts Optional parameters
* @param {module:model/OuterNumber} opts.body Input number as post body
* @param {Number} opts.body Input number as post body
* @param {module:api/FakeApi~fakeOuterNumberSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OuterNumber}
*/
@@ -167,7 +167,7 @@
var authNames = [];
var contentTypes = [];
var accepts = [];
var accepts = ['*/*'];
var returnType = OuterNumber;
return this.apiClient.callApi(
@@ -188,7 +188,7 @@
/**
* Test serialization of outer string types
* @param {Object} opts Optional parameters
* @param {module:model/OuterString} opts.body Input string as post body
* @param {String} opts.body Input string as post body
* @param {module:api/FakeApi~fakeOuterStringSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OuterString}
*/
@@ -210,7 +210,7 @@
var authNames = [];
var contentTypes = [];
var accepts = [];
var accepts = ['*/*'];
var returnType = OuterString;
return this.apiClient.callApi(
@@ -220,6 +220,57 @@
);
}
/**
* Callback function to receive the result of the testBodyWithQueryParams operation.
* @callback module:api/FakeApi~testBodyWithQueryParamsCallback
* @param {String} error Error message, if any.
* @param data This operation does not return a value.
* @param {String} response The complete HTTP response.
*/
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:api/FakeApi~testBodyWithQueryParamsCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.testBodyWithQueryParams = function(query, user, callback) {
var postBody = user;
// verify the required parameter 'query' is set
if (query === undefined || query === null) {
throw new Error("Missing the required parameter 'query' when calling testBodyWithQueryParams");
}
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling testBodyWithQueryParams");
}
var pathParams = {
};
var queryParams = {
'query': query,
};
var collectionQueryParams = {
};
var headerParams = {
};
var formParams = {
};
var authNames = [];
var contentTypes = ['application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
'/fake/body-with-query-params', 'PUT',
pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
authNames, contentTypes, accepts, returnType, callback
);
}
/**
* Callback function to receive the result of the testClientModel operation.
* @callback module:api/FakeApi~testClientModelCallback
@@ -231,16 +282,16 @@
/**
* To test \"client\" model
* To test \"client\" model
* @param {module:model/Client} body client model
* @param {module:model/Client} client client model
* @param {module:api/FakeApi~testClientModelCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
this.testClientModel = function(body, callback) {
var postBody = body;
this.testClientModel = function(client, callback) {
var postBody = client;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClientModel");
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClientModel");
}
@@ -288,7 +339,7 @@
* @param {Number} opts.int64 None
* @param {Number} opts._float None
* @param {String} opts._string None
* @param {Blob} opts.binary None
* @param {File} opts.binary None
* @param {Date} opts._date None
* @param {Date} opts.dateTime None
* @param {String} opts.password None
@@ -346,8 +397,8 @@
};
var authNames = ['http_basic_test'];
var contentTypes = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'];
var accepts = ['application/xml; charset=utf-8', 'application/json; charset=utf-8'];
var contentTypes = ['application/x-www-form-urlencoded'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -369,14 +420,14 @@
* To test enum parameters
* To test enum parameters
* @param {Object} opts Optional parameters
* @param {Array.<module:model/String>} opts.enumFormStringArray Form parameter enum test (string array)
* @param {module:model/String} opts.enumFormString Form parameter enum test (string) (default to -efg)
* @param {Array.<module:model/String>} opts.enumHeaderStringArray Header parameter enum test (string array)
* @param {module:model/String} opts.enumHeaderString Header parameter enum test (string) (default to -efg)
* @param {Array.<module:model/String>} opts.enumQueryStringArray Query parameter enum test (string array)
* @param {module:model/String} opts.enumQueryString Query parameter enum test (string) (default to -efg)
* @param {module:model/Number} opts.enumQueryInteger Query parameter enum test (double)
* @param {module:model/Number} opts.enumQueryDouble Query parameter enum test (double)
* @param {module:model/String} opts.enumFormStringArray Form parameter enum test (string array)
* @param {module:model/String} opts.enumFormString Form parameter enum test (string)
* @param {module:api/FakeApi~testEnumParametersCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.testEnumParameters = function(opts, callback) {
@@ -387,28 +438,25 @@
var pathParams = {
};
var queryParams = {
'enum_query_string_array': opts['enumQueryStringArray'],
'enum_query_string': opts['enumQueryString'],
'enum_query_integer': opts['enumQueryInteger'],
'enum_query_double': opts['enumQueryDouble'],
};
var collectionQueryParams = {
'enum_query_string_array': {
value: opts['enumQueryStringArray'],
collectionFormat: 'csv'
},
};
var headerParams = {
'enum_header_string_array': opts['enumHeaderStringArray'],
'enum_header_string': opts['enumHeaderString']
};
var formParams = {
'enum_form_string_array': this.apiClient.buildCollectionParam(opts['enumFormStringArray'], 'csv'),
'enum_form_string': opts['enumFormString'],
'enum_query_double': opts['enumQueryDouble']
'enum_form_string_array': opts['enumFormStringArray'],
'enum_form_string': opts['enumFormString']
};
var authNames = [];
var contentTypes = ['*/*'];
var accepts = ['*/*'];
var contentTypes = ['application/x-www-form-urlencoded'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -428,16 +476,15 @@
/**
* test inline additionalProperties
*
* @param {Object} param request body
* @param {Object.<String, String>} requestBody request body
* @param {module:api/FakeApi~testInlineAdditionalPropertiesCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.testInlineAdditionalProperties = function(param, callback) {
var postBody = param;
this.testInlineAdditionalProperties = function(requestBody, callback) {
var postBody = requestBody;
// verify the required parameter 'param' is set
if (param === undefined || param === null) {
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
// verify the required parameter 'requestBody' is set
if (requestBody === undefined || requestBody === null) {
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
}
@@ -474,7 +521,6 @@
/**
* test json serialization of form data
*
* @param {String} param field1
* @param {String} param2 field2
* @param {module:api/FakeApi~testJsonFormDataCallback} callback The callback function, accepting three arguments: error, data, response
@@ -507,7 +553,7 @@
};
var authNames = [];
var contentTypes = ['application/json'];
var contentTypes = ['application/x-www-form-urlencoded'];
var accepts = [];
var returnType = null;

View File

@@ -8,7 +8,7 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.0-SNAPSHOT
* Swagger Codegen version: 3.0.0-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -58,16 +58,17 @@
/**
* To test class name in snake case
* @param {module:model/Client} body client model
* To test class name in snake case
* @param {module:model/Client} client client model
* @param {module:api/FakeClassnameTags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
this.testClassname = function(body, callback) {
var postBody = body;
this.testClassname = function(client, callback) {
var postBody = client;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling testClassname");
// verify the required parameter 'client' is set
if (client === undefined || client === null) {
throw new Error("Missing the required parameter 'client' when calling testClassname");
}

View File

@@ -8,7 +8,7 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.0-SNAPSHOT
* Swagger Codegen version: 3.0.0-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -58,16 +58,15 @@
/**
* Add a new pet to the store
*
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:api/PetApi~addPetCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.addPet = function(body, callback) {
var postBody = body;
this.addPet = function(pet, callback) {
var postBody = pet;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling addPet");
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling addPet");
}
@@ -84,7 +83,7 @@
var authNames = ['petstore_auth'];
var contentTypes = ['application/json', 'application/xml'];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -104,7 +103,6 @@
/**
* Deletes a pet
*
* @param {Number} petId Pet id to delete
* @param {Object} opts Optional parameters
* @param {String} opts.apiKey
@@ -135,7 +133,7 @@
var authNames = ['petstore_auth'];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -172,12 +170,9 @@
var pathParams = {
};
var queryParams = {
'status': status,
};
var collectionQueryParams = {
'status': {
value: status,
collectionFormat: 'csv'
},
};
var headerParams = {
};
@@ -223,12 +218,9 @@
var pathParams = {
};
var queryParams = {
'tags': tags,
};
var collectionQueryParams = {
'tags': {
value: tags,
collectionFormat: 'csv'
},
};
var headerParams = {
};
@@ -305,16 +297,15 @@
/**
* Update an existing pet
*
* @param {module:model/Pet} body Pet object that needs to be added to the store
* @param {module:model/Pet} pet Pet object that needs to be added to the store
* @param {module:api/PetApi~updatePetCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.updatePet = function(body, callback) {
var postBody = body;
this.updatePet = function(pet, callback) {
var postBody = pet;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updatePet");
// verify the required parameter 'pet' is set
if (pet === undefined || pet === null) {
throw new Error("Missing the required parameter 'pet' when calling updatePet");
}
@@ -331,7 +322,7 @@
var authNames = ['petstore_auth'];
var contentTypes = ['application/json', 'application/xml'];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -351,7 +342,6 @@
/**
* Updates a pet in the store with form data
*
* @param {Number} petId ID of pet that needs to be updated
* @param {Object} opts Optional parameters
* @param {String} opts.name Updated name of the pet
@@ -384,7 +374,7 @@
var authNames = ['petstore_auth'];
var contentTypes = ['application/x-www-form-urlencoded'];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -404,7 +394,6 @@
/**
* uploads an image
*
* @param {Number} petId ID of pet to update
* @param {Object} opts Optional parameters
* @param {String} opts.additionalMetadata Additional data to pass to server

View File

@@ -8,7 +8,7 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.0-SNAPSHOT
* Swagger Codegen version: 3.0.0-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -85,7 +85,7 @@
var authNames = [];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -99,7 +99,7 @@
* Callback function to receive the result of the getInventory operation.
* @callback module:api/StoreApi~getInventoryCallback
* @param {String} error Error message, if any.
* @param {Object.<String, {'String': 'Number'}>} data The data returned by the service call.
* @param {Object.<String, {String: Number}>} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
@@ -107,7 +107,7 @@
* Returns pet inventories by status
* Returns a map of status codes to quantities
* @param {module:api/StoreApi~getInventoryCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link Object.<String, {'String': 'Number'}>}
* data is of type: {@link Object.<String, {String: Number}>}
*/
this.getInventory = function(callback) {
var postBody = null;
@@ -127,7 +127,7 @@
var authNames = ['api_key'];
var contentTypes = [];
var accepts = ['application/json'];
var returnType = {'String': 'Number'};
var returnType = {String: Number};
return this.apiClient.callApi(
'/store/inventory', 'GET',
@@ -194,17 +194,16 @@
/**
* Place an order for a pet
*
* @param {module:model/Order} body order placed for purchasing the pet
* @param {module:model/Order} order order placed for purchasing the pet
* @param {module:api/StoreApi~placeOrderCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Order}
*/
this.placeOrder = function(body, callback) {
var postBody = body;
this.placeOrder = function(order, callback) {
var postBody = order;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling placeOrder");
// verify the required parameter 'order' is set
if (order === undefined || order === null) {
throw new Error("Missing the required parameter 'order' when calling placeOrder");
}

View File

@@ -8,7 +8,7 @@
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
*
* Swagger Codegen version: 2.3.0-SNAPSHOT
* Swagger Codegen version: 3.0.0-SNAPSHOT
*
* Do not edit the class manually.
*
@@ -59,15 +59,15 @@
/**
* Create user
* This can only be done by the logged in user.
* @param {module:model/User} body Created user object
* @param {module:model/User} user Created user object
* @param {module:api/UserApi~createUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.createUser = function(body, callback) {
var postBody = body;
this.createUser = function(user, callback) {
var postBody = user;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUser");
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUser");
}
@@ -84,7 +84,7 @@
var authNames = [];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -104,16 +104,15 @@
/**
* Creates list of users with given input array
*
* @param {Array.<module:model/User>} body List of user object
* @param {Array.<User>} user List of user object
* @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.createUsersWithArrayInput = function(body, callback) {
var postBody = body;
this.createUsersWithArrayInput = function(user, callback) {
var postBody = user;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput");
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
}
@@ -130,7 +129,7 @@
var authNames = [];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -150,16 +149,15 @@
/**
* Creates list of users with given input array
*
* @param {Array.<module:model/User>} body List of user object
* @param {Array.<User>} user List of user object
* @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.createUsersWithListInput = function(body, callback) {
var postBody = body;
this.createUsersWithListInput = function(user, callback) {
var postBody = user;
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput");
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
}
@@ -176,7 +174,7 @@
var authNames = [];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -223,7 +221,7 @@
var authNames = [];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -243,8 +241,7 @@
/**
* Get user by user name
*
* @param {String} username The name that needs to be fetched. Use user1 for testing.
* @param {String} username The name that needs to be fetched. Use user1 for testing.
* @param {module:api/UserApi~getUserByNameCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/User}
*/
@@ -285,17 +282,16 @@
* Callback function to receive the result of the loginUser operation.
* @callback module:api/UserApi~loginUserCallback
* @param {String} error Error message, if any.
* @param {'String'} data The data returned by the service call.
* @param {String} data The data returned by the service call.
* @param {String} response The complete HTTP response.
*/
/**
* Logs user into the system
*
* @param {String} username The user name for login
* @param {String} password The password for login in clear text
* @param {module:api/UserApi~loginUserCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link 'String'}
* data is of type: {@link String}
*/
this.loginUser = function(username, password, callback) {
var postBody = null;
@@ -327,7 +323,7 @@
var authNames = [];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var returnType = 'String';
var returnType = String;
return this.apiClient.callApi(
'/user/login', 'GET',
@@ -346,7 +342,6 @@
/**
* Logs out current logged in user session
*
* @param {module:api/UserApi~logoutUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.logoutUser = function(callback) {
@@ -366,7 +361,7 @@
var authNames = [];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(
@@ -388,20 +383,20 @@
* Updated user
* This can only be done by the logged in user.
* @param {String} username name that need to be deleted
* @param {module:model/User} body Updated user object
* @param {module:model/User} user Updated user object
* @param {module:api/UserApi~updateUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
this.updateUser = function(username, body, callback) {
var postBody = body;
this.updateUser = function(username, user, callback) {
var postBody = user;
// verify the required parameter 'username' is set
if (username === undefined || username === null) {
throw new Error("Missing the required parameter 'username' when calling updateUser");
}
// verify the required parameter 'body' is set
if (body === undefined || body === null) {
throw new Error("Missing the required parameter 'body' when calling updateUser");
// verify the required parameter 'user' is set
if (user === undefined || user === null) {
throw new Error("Missing the required parameter 'user' when calling updateUser");
}
@@ -419,7 +414,7 @@
var authNames = [];
var contentTypes = [];
var accepts = ['application/xml', 'application/json'];
var accepts = [];
var returnType = null;
return this.apiClient.callApi(