Update fake API to contain sample with binary body (#9610)

This commit is contained in:
Peter Leibiger
2021-05-29 04:26:01 +02:00
committed by GitHub
parent 1b6fd2dd7a
commit f7b93ebdf2
46 changed files with 1844 additions and 42 deletions

View File

@@ -11,6 +11,7 @@ Method | HTTP request | Description
[**fakeOuterNumberSerialize**](FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
[**fakeOuterStringSerialize**](FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
[**fakePropertyEnumIntegerSerialize**](FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
[**testBodyWithBinary**](FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
[**testBodyWithFileSchema**](FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
[**testBodyWithQueryParams**](FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
[**testClientModel**](FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
@@ -345,13 +346,58 @@ No authorization required
- **Accept**: */*
## testBodyWithBinary
> testBodyWithBinary(body)
For this test, the body has to be a binary file.
### Example
```javascript
import OpenApiPetstore from 'open_api_petstore';
let apiInstance = new OpenApiPetstore.FakeApi();
let body = "/path/to/file"; // File | image to upload
apiInstance.testBodyWithBinary(body, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**body** | **File**| image to upload |
### Return type
null (empty response body)
### Authorization
No authorization required
### HTTP request headers
- **Content-Type**: image/png
- **Accept**: Not defined
## testBodyWithFileSchema
> testBodyWithFileSchema(fileSchemaTestClass)
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`.
### Example