forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/3.2.x' into 4.0.x
This commit is contained in:
@@ -439,7 +439,7 @@ Name | Type | Description | Notes
|
||||
|
||||
<a name="uploadFileWithRequiredFile"></a>
|
||||
# **uploadFileWithRequiredFile**
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
|
||||
> ModelApiResponse uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata)
|
||||
|
||||
uploads an image (required)
|
||||
|
||||
@@ -460,10 +460,10 @@ petstore_auth.setAccessToken("YOUR ACCESS TOKEN");
|
||||
|
||||
PetApi apiInstance = new PetApi();
|
||||
Long petId = 56L; // Long | ID of pet to update
|
||||
File file = new File("null"); // File | file to upload
|
||||
File requiredFile = new File("null"); // File | file to upload
|
||||
String additionalMetadata = "null"; // String | Additional data to pass to server
|
||||
try {
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
|
||||
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, requiredFile, additionalMetadata);
|
||||
System.out.println(result);
|
||||
} catch (ApiException e) {
|
||||
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
|
||||
@@ -476,7 +476,7 @@ try {
|
||||
Name | Type | Description | Notes
|
||||
------------- | ------------- | ------------- | -------------
|
||||
**petId** | **Long**| ID of pet to update |
|
||||
**file** | **File**| file to upload | [default to null]
|
||||
**requiredFile** | **File**| file to upload | [default to null]
|
||||
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
|
||||
|
||||
### Return type
|
||||
|
||||
@@ -483,25 +483,25 @@ if (file != null)
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ModelApiResponse
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
return uploadFileWithRequiredFileWithHttpInfo(petId, file, additionalMetadata).getData();
|
||||
public ModelApiResponse uploadFileWithRequiredFile(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
return uploadFileWithRequiredFileWithHttpInfo(petId, requiredFile, additionalMetadata).getData();
|
||||
}
|
||||
|
||||
/**
|
||||
* uploads an image (required)
|
||||
*
|
||||
* @param petId ID of pet to update (required)
|
||||
* @param file file to upload (required)
|
||||
* @param requiredFile file to upload (required)
|
||||
* @param additionalMetadata Additional data to pass to server (optional, default to null)
|
||||
* @return ApiResponse<ModelApiResponse>
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File file, String additionalMetadata) throws ApiException {
|
||||
public ApiResponse<ModelApiResponse> uploadFileWithRequiredFileWithHttpInfo(Long petId, File requiredFile, String additionalMetadata) throws ApiException {
|
||||
Object localVarPostBody = new Object();
|
||||
|
||||
// verify the required parameter 'petId' is set
|
||||
@@ -509,9 +509,9 @@ if (file != null)
|
||||
throw new ApiException(400, "Missing the required parameter 'petId' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// verify the required parameter 'file' is set
|
||||
if (file == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'file' when calling uploadFileWithRequiredFile");
|
||||
// verify the required parameter 'requiredFile' is set
|
||||
if (requiredFile == null) {
|
||||
throw new ApiException(400, "Missing the required parameter 'requiredFile' when calling uploadFileWithRequiredFile");
|
||||
}
|
||||
|
||||
// create path and map variables
|
||||
@@ -527,8 +527,8 @@ if (file != null)
|
||||
|
||||
if (additionalMetadata != null)
|
||||
localVarFormParams.put("additionalMetadata", additionalMetadata);
|
||||
if (file != null)
|
||||
localVarFormParams.put("file", file);
|
||||
if (requiredFile != null)
|
||||
localVarFormParams.put("requiredFile", requiredFile);
|
||||
|
||||
final String[] localVarAccepts = {
|
||||
"application/json"
|
||||
|
||||
Reference in New Issue
Block a user