forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/5.3.x' into 6.0.x
This commit is contained in:
@@ -1 +1,5 @@
|
||||
6.0.0-SNAPSHOT
|
||||
<<<<<<< HEAD
|
||||
6.0.0-SNAPSHOT
|
||||
=======
|
||||
5.3.0-SNAPSHOT
|
||||
>>>>>>> origin/5.3.x
|
||||
|
||||
@@ -127,6 +127,7 @@ Class | Method | HTTP request | Description
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterNumberSerialize**](docs/FakeApi.md#fakeOuterNumberSerialize) | **POST** /fake/outer/number |
|
||||
*OpenApiPetstore.FakeApi* | [**fakeOuterStringSerialize**](docs/FakeApi.md#fakeOuterStringSerialize) | **POST** /fake/outer/string |
|
||||
*OpenApiPetstore.FakeApi* | [**fakePropertyEnumIntegerSerialize**](docs/FakeApi.md#fakePropertyEnumIntegerSerialize) | **POST** /fake/property/enum-int |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithBinary**](docs/FakeApi.md#testBodyWithBinary) | **PUT** /fake/body-with-binary |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithFileSchema**](docs/FakeApi.md#testBodyWithFileSchema) | **PUT** /fake/body-with-file-schema |
|
||||
*OpenApiPetstore.FakeApi* | [**testBodyWithQueryParams**](docs/FakeApi.md#testBodyWithQueryParams) | **PUT** /fake/body-with-query-params |
|
||||
*OpenApiPetstore.FakeApi* | [**testClientModel**](docs/FakeApi.md#testClientModel) | **PATCH** /fake | To test \"client\" model
|
||||
|
||||
@@ -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
|
||||
@@ -338,13 +339,57 @@ 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).then(() => {
|
||||
console.log('API called successfully.');
|
||||
}, (error) => {
|
||||
console.error(error);
|
||||
});
|
||||
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
|
||||
@@ -356,7 +356,52 @@ export default class FakeApi {
|
||||
|
||||
|
||||
/**
|
||||
* For this test, the body for this request much reference a schema named `File`.
|
||||
* For this test, the body has to be a binary file.
|
||||
* @param {File} body image to upload
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
testBodyWithBinaryWithHttpInfo(body) {
|
||||
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
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* For this test, the body has to be a binary file.
|
||||
* @param {File} body image to upload
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
testBodyWithBinary(body) {
|
||||
return this.testBodyWithBinaryWithHttpInfo(body)
|
||||
.then(function(response_and_data) {
|
||||
return response_and_data.data;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* For this test, the body for this request must reference a schema named `File`.
|
||||
* @param {module:model/FileSchemaTestClass} fileSchemaTestClass
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}, with an object containing HTTP response
|
||||
*/
|
||||
@@ -388,7 +433,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
|
||||
* @return {Promise} a {@link https://www.promisejs.org/|Promise}
|
||||
*/
|
||||
@@ -874,7 +919,7 @@ export default class FakeApi {
|
||||
let pathParams = {
|
||||
};
|
||||
let queryParams = {
|
||||
'pipe': this.apiClient.buildCollectionParam(pipe, 'multi'),
|
||||
'pipe': this.apiClient.buildCollectionParam(pipe, 'pipes'),
|
||||
'ioutil': this.apiClient.buildCollectionParam(ioutil, 'csv'),
|
||||
'http': this.apiClient.buildCollectionParam(http, 'ssv'),
|
||||
'url': this.apiClient.buildCollectionParam(url, 'csv'),
|
||||
|
||||
Reference in New Issue
Block a user