mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-21 22:37:06 +00:00
[JavaScript] Update vulnerable dependencies (#784)
* Update vulnerable dependencies * Update samples: javascript-es6 * Update samples: javascript-promise * Update samples: javascript-promise-es6 * Update samples: javascript * Update samples: petstore-security-test/javascript * Rename operationId if it starts with a number * Update samples bin/javascript-petstore.sh bin/javascript-es6-petstore.sh bin/javascript-promise-petstore.sh bin/javascript-promise-es6-petstore.sh
This commit is contained in:
committed by
William Cheng
parent
afdef8f890
commit
21777f2759
@@ -35,8 +35,8 @@ export default class AnotherFakeApi {
|
||||
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testSpecialTags operation.
|
||||
* @callback module:api/AnotherFakeApi~testSpecialTagsCallback
|
||||
* Callback function to receive the result of the call123testSpecialTags operation.
|
||||
* @callback module:api/AnotherFakeApi~call123testSpecialTagsCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/Client} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
@@ -44,17 +44,17 @@ export default class AnotherFakeApi {
|
||||
|
||||
/**
|
||||
* To test special tags
|
||||
* To test special tags
|
||||
* To test special tags and operation ID starting with number
|
||||
* @param {module:model/Client} client client model
|
||||
* @param {module:api/AnotherFakeApi~testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* @param {module:api/AnotherFakeApi~call123testSpecialTagsCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/Client}
|
||||
*/
|
||||
testSpecialTags(client, callback) {
|
||||
call123testSpecialTags(client, callback) {
|
||||
let postBody = client;
|
||||
|
||||
// verify the required parameter 'client' is set
|
||||
if (client === undefined || client === null) {
|
||||
throw new Error("Missing the required parameter 'client' when calling testSpecialTags");
|
||||
throw new Error("Missing the required parameter 'client' when calling call123testSpecialTags");
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
|
||||
import ApiClient from "../ApiClient";
|
||||
import Client from '../model/Client';
|
||||
import FileSchemaTestClass from '../model/FileSchemaTestClass';
|
||||
import OuterComposite from '../model/OuterComposite';
|
||||
import User from '../model/User';
|
||||
|
||||
@@ -200,6 +201,49 @@ export default class FakeApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testBodyWithFileSchema operation.
|
||||
* @callback module:api/FakeApi~testBodyWithFileSchemaCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param data This operation does not return a value.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @param {module:api/FakeApi~testBodyWithFileSchemaCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testBodyWithFileSchema(fileSchemaTestClass, callback) {
|
||||
let postBody = fileSchemaTestClass;
|
||||
|
||||
// verify the required parameter 'fileSchemaTestClass' is set
|
||||
if (fileSchemaTestClass === undefined || fileSchemaTestClass === null) {
|
||||
throw new Error("Missing the required parameter 'fileSchemaTestClass' when calling testBodyWithFileSchema");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['application/json'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/body-with-file-schema', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testBodyWithQueryParams operation.
|
||||
* @callback module:api/FakeApi~testBodyWithQueryParamsCallback
|
||||
|
||||
@@ -408,5 +408,61 @@ export default class PetApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the uploadFileWithRequiredFile operation.
|
||||
* @callback module:api/PetApi~uploadFileWithRequiredFileCallback
|
||||
* @param {String} error Error message, if any.
|
||||
* @param {module:model/ApiResponse} data The data returned by the service call.
|
||||
* @param {String} response The complete HTTP response.
|
||||
*/
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
* @param {Number} petId ID of pet to update
|
||||
* @param {File} requiredFile file to upload
|
||||
* @param {Object} opts Optional parameters
|
||||
* @param {String} opts.additionalMetadata Additional data to pass to server
|
||||
* @param {module:api/PetApi~uploadFileWithRequiredFileCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
* data is of type: {@link module:model/ApiResponse}
|
||||
*/
|
||||
uploadFileWithRequiredFile(petId, requiredFile, opts, callback) {
|
||||
opts = opts || {};
|
||||
let postBody = null;
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
if (petId === undefined || petId === null) {
|
||||
throw new Error("Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile === undefined || requiredFile === null) {
|
||||
throw new Error("Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
|
||||
let pathParams = {
|
||||
'petId': petId
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
'additionalMetadata': opts['additionalMetadata'],
|
||||
'requiredFile': requiredFile
|
||||
};
|
||||
|
||||
let authNames = ['petstore_auth'];
|
||||
let contentTypes = ['multipart/form-data'];
|
||||
let accepts = ['application/json'];
|
||||
let returnType = ApiResponse;
|
||||
|
||||
return this.apiClient.callApi(
|
||||
'/fake/{petId}/uploadImageWithRequiredFile', 'POST',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, callback
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user