mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-09 19:36:09 +00:00
Use JS ES6 as the default (#1825)
* set JS ES6 as the default * update doc
This commit is contained in:
@@ -38,15 +38,15 @@ export default class AnotherFakeApi {
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:model/Client} body client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
|
||||
*/
|
||||
call123testSpecialTagsWithHttpInfo(client) {
|
||||
let postBody = client;
|
||||
call123testSpecialTagsWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling call123testSpecialTags");
|
||||
}
|
||||
|
||||
|
||||
@@ -74,11 +74,11 @@ export default class AnotherFakeApi {
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:model/Client} body client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
*/
|
||||
call123testSpecialTags(client) {
|
||||
return this.call123testSpecialTagsWithHttpInfo(client)
|
||||
call123testSpecialTags(body) {
|
||||
return this.call123testSpecialTagsWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -87,12 +87,12 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of object with outer number type
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
|
||||
* @param {module:model/OuterComposite} opts.body Input composite as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/OuterComposite} and HTTP response
|
||||
*/
|
||||
fakeOuterCompositeSerializeWithHttpInfo(opts) {
|
||||
opts = opts || {};
|
||||
let postBody = opts['outerComposite'];
|
||||
let postBody = opts['body'];
|
||||
|
||||
|
||||
let pathParams = {
|
||||
@@ -119,7 +119,7 @@ export default class FakeApi {
|
||||
/**
|
||||
* Test serialization of object with outer number type
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {module:model/OuterComposite} opts.outerComposite Input composite as post body
|
||||
* @param {module:model/OuterComposite} opts.body Input composite as post body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/OuterComposite}
|
||||
*/
|
||||
fakeOuterCompositeSerialize(opts) {
|
||||
@@ -224,15 +224,15 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @param {module:model/FileSchemaTestClass} body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass) {
|
||||
let postBody = fileSchemaTestClass;
|
||||
testBodyWithFileSchemaWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'fileSchemaTestClass' is set
|
||||
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
|
||||
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testBodyWithFileSchema");
|
||||
}
|
||||
|
||||
|
||||
@@ -259,11 +259,11 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @param {module:model/FileSchemaTestClass} body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testBodyWithFileSchema(fileSchemaTestClass) {
|
||||
return this.testBodyWithFileSchemaWithHttpInfo(fileSchemaTestClass)
|
||||
testBodyWithFileSchema(body) {
|
||||
return this.testBodyWithFileSchemaWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -272,20 +272,20 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* @param {String} query
|
||||
* @param {module:model/User} user
|
||||
* @param {module:model/User} body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testBodyWithQueryParamsWithHttpInfo(query, user) {
|
||||
let postBody = user;
|
||||
testBodyWithQueryParamsWithHttpInfo(query, body) {
|
||||
let postBody = body;
|
||||
|
||||
// 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");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testBodyWithQueryParams");
|
||||
}
|
||||
|
||||
|
||||
@@ -313,11 +313,11 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* @param {String} query
|
||||
* @param {module:model/User} user
|
||||
* @param {module:model/User} body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testBodyWithQueryParams(query, user) {
|
||||
return this.testBodyWithQueryParamsWithHttpInfo(query, user)
|
||||
testBodyWithQueryParams(query, body) {
|
||||
return this.testBodyWithQueryParamsWithHttpInfo(query, body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -327,15 +327,15 @@ export default class FakeApi {
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:model/Client} body client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
|
||||
*/
|
||||
testClientModelWithHttpInfo(client) {
|
||||
let postBody = client;
|
||||
testClientModelWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testClientModel");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testClientModel");
|
||||
}
|
||||
|
||||
|
||||
@@ -363,11 +363,11 @@ export default class FakeApi {
|
||||
/**
|
||||
* To test \"client\" model
|
||||
* To test \"client\" model
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:model/Client} body client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
*/
|
||||
testClientModel(client) {
|
||||
return this.testClientModelWithHttpInfo(client)
|
||||
testClientModel(body) {
|
||||
return this.testClientModelWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -633,15 +633,15 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
* @param {Object.<String, {String: String}>} requestBody request body
|
||||
* @param {Object.<String, {String: String}>} param request body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testInlineAdditionalPropertiesWithHttpInfo(requestBody) {
|
||||
let postBody = requestBody;
|
||||
testInlineAdditionalPropertiesWithHttpInfo(param) {
|
||||
let postBody = param;
|
||||
|
||||
// verify the required parameter 'requestBody' is set
|
||||
if (requestBody === undefined || requestBody === null) {
|
||||
throw new Error("Missing the required parameter 'requestBody' when calling testInlineAdditionalProperties");
|
||||
// verify the required parameter 'param' is set
|
||||
if (param === undefined || param === null) {
|
||||
throw new Error("Missing the required parameter 'param' when calling testInlineAdditionalProperties");
|
||||
}
|
||||
|
||||
|
||||
@@ -668,11 +668,11 @@ export default class FakeApi {
|
||||
|
||||
/**
|
||||
* test inline additionalProperties
|
||||
* @param {Object.<String, {String: String}>} requestBody request body
|
||||
* @param {Object.<String, {String: String}>} param request body
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testInlineAdditionalProperties(requestBody) {
|
||||
return this.testInlineAdditionalPropertiesWithHttpInfo(requestBody)
|
||||
testInlineAdditionalProperties(param) {
|
||||
return this.testInlineAdditionalPropertiesWithHttpInfo(param)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -38,15 +38,15 @@ export default class FakeClassnameTags123Api {
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:model/Client} body client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Client} and HTTP response
|
||||
*/
|
||||
testClassnameWithHttpInfo(client) {
|
||||
let postBody = client;
|
||||
testClassnameWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testClassname");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testClassname");
|
||||
}
|
||||
|
||||
|
||||
@@ -74,11 +74,11 @@ export default class FakeClassnameTags123Api {
|
||||
/**
|
||||
* To test class name in snake case
|
||||
* To test class name in snake case
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:model/Client} body client model
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Client}
|
||||
*/
|
||||
testClassname(client) {
|
||||
return this.testClassnameWithHttpInfo(client)
|
||||
testClassname(body) {
|
||||
return this.testClassnameWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -38,15 +38,15 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param {module:model/Pet} body Pet object that needs to be added to the store
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
addPetWithHttpInfo(pet) {
|
||||
let postBody = pet;
|
||||
addPetWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'pet' is set
|
||||
if (pet === undefined || pet === null) {
|
||||
throw new Error("Missing the required parameter 'pet' when calling addPet");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling addPet");
|
||||
}
|
||||
|
||||
|
||||
@@ -73,11 +73,11 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Add a new pet to the store
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param {module:model/Pet} body Pet object that needs to be added to the store
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
addPet(pet) {
|
||||
return this.addPetWithHttpInfo(pet)
|
||||
addPet(body) {
|
||||
return this.addPetWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -294,15 +294,15 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param {module:model/Pet} body Pet object that needs to be added to the store
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
updatePetWithHttpInfo(pet) {
|
||||
let postBody = pet;
|
||||
updatePetWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'pet' is set
|
||||
if (pet === undefined || pet === null) {
|
||||
throw new Error("Missing the required parameter 'pet' when calling updatePet");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling updatePet");
|
||||
}
|
||||
|
||||
|
||||
@@ -329,11 +329,11 @@ export default class PetApi {
|
||||
|
||||
/**
|
||||
* Update an existing pet
|
||||
* @param {module:model/Pet} pet Pet object that needs to be added to the store
|
||||
* @param {module:model/Pet} body Pet object that needs to be added to the store
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
updatePet(pet) {
|
||||
return this.updatePetWithHttpInfo(pet)
|
||||
updatePet(body) {
|
||||
return this.updatePetWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -182,15 +182,15 @@ export default class StoreApi {
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
* @param {module:model/Order} order order placed for purchasing the pet
|
||||
* @param {module:model/Order} body order placed for purchasing the pet
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing data of type {@link module:model/Order} and HTTP response
|
||||
*/
|
||||
placeOrderWithHttpInfo(order) {
|
||||
let postBody = order;
|
||||
placeOrderWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'order' is set
|
||||
if (order === undefined || order === null) {
|
||||
throw new Error("Missing the required parameter 'order' when calling placeOrder");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling placeOrder");
|
||||
}
|
||||
|
||||
|
||||
@@ -217,11 +217,11 @@ export default class StoreApi {
|
||||
|
||||
/**
|
||||
* Place an order for a pet
|
||||
* @param {module:model/Order} order order placed for purchasing the pet
|
||||
* @param {module:model/Order} body order placed for purchasing the pet
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with data of type {@link module:model/Order}
|
||||
*/
|
||||
placeOrder(order) {
|
||||
return this.placeOrderWithHttpInfo(order)
|
||||
placeOrder(body) {
|
||||
return this.placeOrderWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
@@ -38,15 +38,15 @@ export default class UserApi {
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {module:model/User} user Created user object
|
||||
* @param {module:model/User} body Created user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
createUserWithHttpInfo(user) {
|
||||
let postBody = user;
|
||||
createUserWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUser");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUser");
|
||||
}
|
||||
|
||||
|
||||
@@ -74,11 +74,11 @@ export default class UserApi {
|
||||
/**
|
||||
* Create user
|
||||
* This can only be done by the logged in user.
|
||||
* @param {module:model/User} user Created user object
|
||||
* @param {module:model/User} body Created user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
createUser(user) {
|
||||
return this.createUserWithHttpInfo(user)
|
||||
createUser(body) {
|
||||
return this.createUserWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -87,15 +87,15 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @param {Array.<User>} body List of user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
createUsersWithArrayInputWithHttpInfo(user) {
|
||||
let postBody = user;
|
||||
createUsersWithArrayInputWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUsersWithArrayInput");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUsersWithArrayInput");
|
||||
}
|
||||
|
||||
|
||||
@@ -122,11 +122,11 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @param {Array.<User>} body List of user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
createUsersWithArrayInput(user) {
|
||||
return this.createUsersWithArrayInputWithHttpInfo(user)
|
||||
createUsersWithArrayInput(body) {
|
||||
return this.createUsersWithArrayInputWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -135,15 +135,15 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @param {Array.<User>} body List of user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
createUsersWithListInputWithHttpInfo(user) {
|
||||
let postBody = user;
|
||||
createUsersWithListInputWithHttpInfo(body) {
|
||||
let postBody = body;
|
||||
|
||||
// verify the required parameter 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' when calling createUsersWithListInput");
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling createUsersWithListInput");
|
||||
}
|
||||
|
||||
|
||||
@@ -170,11 +170,11 @@ export default class UserApi {
|
||||
|
||||
/**
|
||||
* Creates list of users with given input array
|
||||
* @param {Array.<User>} user List of user object
|
||||
* @param {Array.<User>} body List of user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
createUsersWithListInput(user) {
|
||||
return this.createUsersWithListInputWithHttpInfo(user)
|
||||
createUsersWithListInput(body) {
|
||||
return this.createUsersWithListInputWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
@@ -383,20 +383,20 @@ export default class UserApi {
|
||||
* 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} user Updated user object
|
||||
* @param {module:model/User} body Updated user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
updateUserWithHttpInfo(username, user) {
|
||||
let postBody = user;
|
||||
updateUserWithHttpInfo(username, body) {
|
||||
let postBody = body;
|
||||
|
||||
// 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 'user' is set
|
||||
if (user === undefined || user === null) {
|
||||
throw new Error("Missing the required parameter 'user' 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");
|
||||
}
|
||||
|
||||
|
||||
@@ -426,11 +426,11 @@ export default class UserApi {
|
||||
* 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} user Updated user object
|
||||
* @param {module:model/User} body Updated user object
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
updateUser(username, user) {
|
||||
return this.updateUserWithHttpInfo(username, user)
|
||||
updateUser(username, body) {
|
||||
return this.updateUserWithHttpInfo(username, body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user