forked from loafle/openapi-generator-original
Remove unused callback param when using promises
This commit is contained in:
@@ -173,7 +173,7 @@
|
||||
|
||||
ApiClient.prototype.callApi = function callApi(path, httpMethod, pathParams,
|
||||
queryParams, headerParams, formParams, bodyParam, contentTypes, accepts,
|
||||
returnType, callback) {
|
||||
returnType) {
|
||||
var _this = this;
|
||||
var url = this.buildUrl(path, pathParams);
|
||||
var request = superagent(httpMethod, url);
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
* Update an existing pet
|
||||
*
|
||||
* @param {Pet} body Pet object that needs to be added to the store
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.updatePet = function(body, callback) {
|
||||
self.updatePet = function(body) {
|
||||
var postBody = body;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -57,9 +57,9 @@
|
||||
* Add a new pet to the store
|
||||
*
|
||||
* @param {Pet} body Pet object that needs to be added to the store
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.addPet = function(body, callback) {
|
||||
self.addPet = function(body) {
|
||||
var postBody = body;
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -89,10 +89,10 @@
|
||||
* Finds Pets by status
|
||||
* Multiple status values can be provided with comma seperated strings
|
||||
* @param {[String]} status Status values that need to be considered for filter
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: [Pet]
|
||||
*/
|
||||
self.findPetsByStatus = function(status, callback) {
|
||||
self.findPetsByStatus = function(status) {
|
||||
var postBody = null;
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet/findByStatus', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -123,10 +123,10 @@
|
||||
* Finds Pets by tags
|
||||
* Muliple tags can be provided with comma seperated strings. Use tag1, tag2, tag3 for testing.
|
||||
* @param {[String]} tags Tags to filter by
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: [Pet]
|
||||
*/
|
||||
self.findPetsByTags = function(tags, callback) {
|
||||
self.findPetsByTags = function(tags) {
|
||||
var postBody = null;
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet/findByTags', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -157,10 +157,10 @@
|
||||
* Find pet by ID
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
* @param {Integer} petId ID of pet that needs to be fetched
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: Pet
|
||||
*/
|
||||
self.getPetById = function(petId, callback) {
|
||||
self.getPetById = function(petId) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -187,7 +187,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -198,9 +198,9 @@
|
||||
* @param {String} petId ID of pet that needs to be updated
|
||||
* @param {String} name Updated name of the pet
|
||||
* @param {String} status Updated status of the pet
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.updatePetWithForm = function(petId, name, status, callback) {
|
||||
self.updatePetWithForm = function(petId, name, status) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -229,7 +229,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -239,9 +239,9 @@
|
||||
*
|
||||
* @param {Integer} petId Pet id to delete
|
||||
* @param {String} apiKey
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.deletePet = function(petId, apiKey, callback) {
|
||||
self.deletePet = function(petId, apiKey) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -269,7 +269,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -280,9 +280,9 @@
|
||||
* @param {Integer} petId ID of pet to update
|
||||
* @param {String} additionalMetadata Additional data to pass to server
|
||||
* @param {File} file file to upload
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.uploadFile = function(petId, additionalMetadata, file, callback) {
|
||||
self.uploadFile = function(petId, additionalMetadata, file) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -311,7 +311,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}/uploadImage', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -320,10 +320,10 @@
|
||||
* Fake endpoint to test byte array return by 'Find pet by ID'
|
||||
* Returns a pet when ID < 10. ID > 10 or nonintegers will simulate API error conditions
|
||||
* @param {Integer} petId ID of pet that needs to be fetched
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: 'String'
|
||||
*/
|
||||
self.getPetByIdWithByteArray = function(petId, callback) {
|
||||
self.getPetByIdWithByteArray = function(petId) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -350,7 +350,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet/{petId}?testing_byte_array=true', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -359,9 +359,9 @@
|
||||
* Fake endpoint to test byte array in body parameter for adding a new pet to the store
|
||||
*
|
||||
* @param {String} body Pet object in the form of byte array
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.addPetUsingByteArray = function(body, callback) {
|
||||
self.addPetUsingByteArray = function(body) {
|
||||
var postBody = body;
|
||||
|
||||
|
||||
@@ -382,7 +382,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/pet?testing_byte_array=true', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@
|
||||
/**
|
||||
* Returns pet inventories by status
|
||||
* Returns a map of status codes to quantities
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: {'String': 'Integer'}
|
||||
*/
|
||||
self.getInventory = function(callback) {
|
||||
self.getInventory = function() {
|
||||
var postBody = null;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/store/inventory', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -57,10 +57,10 @@
|
||||
* Place an order for a pet
|
||||
*
|
||||
* @param {Order} body order placed for purchasing the pet
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: Order
|
||||
*/
|
||||
self.placeOrder = function(body, callback) {
|
||||
self.placeOrder = function(body) {
|
||||
var postBody = body;
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/store/order', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -90,10 +90,10 @@
|
||||
* Find purchase order by ID
|
||||
* For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
* @param {String} orderId ID of pet that needs to be fetched
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: Order
|
||||
*/
|
||||
self.getOrderById = function(orderId, callback) {
|
||||
self.getOrderById = function(orderId) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
@@ -120,7 +120,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/store/order/{orderId}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -129,9 +129,9 @@
|
||||
* Delete purchase order by ID
|
||||
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
|
||||
* @param {String} orderId ID of the order that needs to be deleted
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.deleteOrder = function(orderId, callback) {
|
||||
self.deleteOrder = function(orderId) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'orderId' is set
|
||||
@@ -158,7 +158,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/store/order/{orderId}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
@@ -25,9 +25,9 @@
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {User} body Created user object
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.createUser = function(body, callback) {
|
||||
self.createUser = function(body) {
|
||||
var postBody = body;
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/user', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -57,9 +57,9 @@
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param {[User]} body List of user object
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.createUsersWithArrayInput = function(body, callback) {
|
||||
self.createUsersWithArrayInput = function(body) {
|
||||
var postBody = body;
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/user/createWithArray', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -89,9 +89,9 @@
|
||||
* Creates list of users with given input array
|
||||
*
|
||||
* @param {[User]} body List of user object
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.createUsersWithListInput = function(body, callback) {
|
||||
self.createUsersWithListInput = function(body) {
|
||||
var postBody = body;
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/user/createWithList', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -122,10 +122,10 @@
|
||||
*
|
||||
* @param {String} username The user name for login
|
||||
* @param {String} password The password for login in clear text
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: 'String'
|
||||
*/
|
||||
self.loginUser = function(username, password, callback) {
|
||||
self.loginUser = function(username, password) {
|
||||
var postBody = null;
|
||||
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/user/login', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -156,9 +156,9 @@
|
||||
/**
|
||||
* Logs out current logged in user session
|
||||
*
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.logoutUser = function(callback) {
|
||||
self.logoutUser = function() {
|
||||
var postBody = null;
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/user/logout', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -188,10 +188,10 @@
|
||||
* Get user by user name
|
||||
*
|
||||
* @param {String} username The name that needs to be fetched. Use user1 for testing.
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
* data is of type: User
|
||||
*/
|
||||
self.getUserByName = function(username, callback) {
|
||||
self.getUserByName = function(username) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@@ -218,7 +218,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'GET',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -228,9 +228,9 @@
|
||||
* This can only be done by the logged in user.
|
||||
* @param {String} username name that need to be deleted
|
||||
* @param {User} body Updated user object
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.updateUser = function(username, body, callback) {
|
||||
self.updateUser = function(username, body) {
|
||||
var postBody = body;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@@ -257,7 +257,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
@@ -266,9 +266,9 @@
|
||||
* Delete user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {String} username The name that needs to be deleted
|
||||
* @param {function} callback the callback function, accepting three arguments: error, data, response
|
||||
|
||||
*/
|
||||
self.deleteUser = function(username, callback) {
|
||||
self.deleteUser = function(username) {
|
||||
var postBody = null;
|
||||
|
||||
// verify the required parameter 'username' is set
|
||||
@@ -295,7 +295,7 @@
|
||||
return this.apiClient.callApi(
|
||||
'/user/{username}', 'DELETE',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
contentTypes, accepts, returnType, callback
|
||||
contentTypes, accepts, returnType
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user