forked from loafle/openapi-generator-original
Update fake API to contain sample with binary body (#9610)
This commit is contained in:
@@ -319,6 +319,46 @@ export default class FakeApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testBodyWithBinary operation.
|
||||
* @callback module:api/FakeApi~testBodyWithBinaryCallback
|
||||
* @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 has to be a binary file.
|
||||
* @param {File} body image to upload
|
||||
* @param {module:api/FakeApi~testBodyWithBinaryCallback} callback The callback function, accepting three arguments: error, data, response
|
||||
*/
|
||||
testBodyWithBinary(body, callback) {
|
||||
let postBody = body;
|
||||
// verify the required parameter 'body' is set
|
||||
if (body === undefined || body === null) {
|
||||
throw new Error("Missing the required parameter 'body' when calling testBodyWithBinary");
|
||||
}
|
||||
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
};
|
||||
let headerParams = {
|
||||
};
|
||||
let formParams = {
|
||||
};
|
||||
|
||||
let authNames = [];
|
||||
let contentTypes = ['image/png'];
|
||||
let accepts = [];
|
||||
let returnType = null;
|
||||
return this.apiClient.callApi(
|
||||
'/fake/body-with-binary', 'PUT',
|
||||
pathParams, queryParams, headerParams, formParams, postBody,
|
||||
authNames, contentTypes, accepts, returnType, null, callback
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Callback function to receive the result of the testBodyWithFileSchema operation.
|
||||
* @callback module:api/FakeApi~testBodyWithFileSchemaCallback
|
||||
@@ -328,7 +368,7 @@ export default class FakeApi {
|
||||
*/
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* For this test, the body for this request must 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
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user