Use JS ES6 as the default (#1825)

* set JS ES6 as the default

* update doc
This commit is contained in:
William Cheng
2019-01-07 11:43:11 +08:00
committed by GitHub
parent 651395d426
commit f0f214743e
64 changed files with 725 additions and 630 deletions

View File

@@ -45,16 +45,16 @@ 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
* @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
call123testSpecialTags(client, callback) {
let postBody = client;
call123testSpecialTags(body, callback) {
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");
}

View File

@@ -89,13 +89,13 @@ 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
* @param {module:api/FakeApi~fakeOuterCompositeSerializeCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/OuterComposite}
*/
fakeOuterCompositeSerialize(opts, callback) {
opts = opts || {};
let postBody = opts['outerComposite'];
let postBody = opts['body'];
let pathParams = {
@@ -211,15 +211,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
* @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
*/
testBodyWithFileSchema(fileSchemaTestClass, callback) {
let postBody = fileSchemaTestClass;
testBodyWithFileSchema(body, callback) {
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");
}
@@ -254,20 +254,20 @@ export default class FakeApi {
/**
* @param {String} query
* @param {module:model/User} user
* @param {module:model/User} body
* @param {module:api/FakeApi~testBodyWithQueryParamsCallback} callback The callback function, accepting three arguments: error, data, response
*/
testBodyWithQueryParams(query, user, callback) {
let postBody = user;
testBodyWithQueryParams(query, body, callback) {
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");
}
@@ -304,16 +304,16 @@ 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
* @param {module:api/FakeApi~testClientModelCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
testClientModel(client, callback) {
let postBody = client;
testClientModel(body, callback) {
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");
}
@@ -559,15 +559,15 @@ export default class FakeApi {
/**
* test inline additionalProperties
* @param {Object.<String, {String: String}>} requestBody request body
* @param {Object.<String, {String: String}>} param request body
* @param {module:api/FakeApi~testInlineAdditionalPropertiesCallback} callback The callback function, accepting three arguments: error, data, response
*/
testInlineAdditionalProperties(requestBody, callback) {
let postBody = requestBody;
testInlineAdditionalProperties(param, callback) {
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");
}

View File

@@ -45,16 +45,16 @@ 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
* @param {module:api/FakeClassnameTags123Api~testClassnameCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Client}
*/
testClassname(client, callback) {
let postBody = client;
testClassname(body, callback) {
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");
}

View File

@@ -45,15 +45,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
* @param {module:api/PetApi~addPetCallback} callback The callback function, accepting three arguments: error, data, response
*/
addPet(pet, callback) {
let postBody = pet;
addPet(body, callback) {
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");
}
@@ -274,15 +274,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
* @param {module:api/PetApi~updatePetCallback} callback The callback function, accepting three arguments: error, data, response
*/
updatePet(pet, callback) {
let postBody = pet;
updatePet(body, callback) {
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");
}

View File

@@ -174,16 +174,16 @@ 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
* @param {module:api/StoreApi~placeOrderCallback} callback The callback function, accepting three arguments: error, data, response
* data is of type: {@link module:model/Order}
*/
placeOrder(order, callback) {
let postBody = order;
placeOrder(body, callback) {
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");
}

View File

@@ -45,15 +45,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
* @param {module:api/UserApi~createUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUser(user, callback) {
let postBody = user;
createUser(body, callback) {
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");
}
@@ -88,15 +88,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
* @param {module:api/UserApi~createUsersWithArrayInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUsersWithArrayInput(user, callback) {
let postBody = user;
createUsersWithArrayInput(body, callback) {
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");
}
@@ -131,15 +131,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
* @param {module:api/UserApi~createUsersWithListInputCallback} callback The callback function, accepting three arguments: error, data, response
*/
createUsersWithListInput(user, callback) {
let postBody = user;
createUsersWithListInput(body, callback) {
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");
}
@@ -355,20 +355,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
* @param {module:api/UserApi~updateUserCallback} callback The callback function, accepting three arguments: error, data, response
*/
updateUser(username, user, callback) {
let postBody = user;
updateUser(username, body, callback) {
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");
}