[Golang][client] fix undefined: localVarFile (#382)

* fix undefined: localVarFile

* add required formData file endpoints to 2.0 and 3.0 specs

* streamline api.mustache update

* update sampels

* update samples

* update samples

* update samples bin/jaxrs-cxf-client-petstore.sh

* update samples

* update samples

* update samples run-all-petstore

* update samples

* update samples

* Trigger CI due to race condition

* update samples

* update samples

* Trigger CI due to previous timeout

* Trigger CI due to previous Shippable timeout

* Trigger CI due to previous Shippable race condition
This commit is contained in:
John Wang
2018-07-01 01:58:45 -07:00
committed by William Cheng
parent 8bddf12e05
commit e960fe9512
109 changed files with 4209 additions and 48 deletions

View File

@@ -12,6 +12,7 @@ Method | HTTP request | Description
[**updatePet**](PetApi.md#updatePet) | **PUT** /pet | Update an existing pet
[**updatePetWithForm**](PetApi.md#updatePetWithForm) | **POST** /pet/{petId} | Updates a pet in the store with form data
[**uploadFile**](PetApi.md#uploadFile) | **POST** /pet/{petId}/uploadImage | uploads an image
[**uploadFileWithRequiredFile**](PetApi.md#uploadFileWithRequiredFile) | **POST** /pet/{petId}/uploadImageWithRequiredFile | uploads an image
<a name="addPet"></a>
@@ -436,3 +437,58 @@ Name | Type | Description | Notes
- **Content-Type**: multipart/form-data
- **Accept**: application/json
<a name="uploadFileWithRequiredFile"></a>
# **uploadFileWithRequiredFile**
> ModelApiResponse uploadFileWithRequiredFile(petId, file, additionalMetadata)
uploads an image
### Example
```java
// Import classes:
//import org.openapitools.client.ApiClient;
//import org.openapitools.client.ApiException;
//import org.openapitools.client.Configuration;
//import org.openapitools.client.auth.*;
//import org.openapitools.client.api.PetApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure OAuth2 access token for authorization: petstore_auth
OAuth petstore_auth = (OAuth) defaultClient.getAuthentication("petstore_auth");
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
String additionalMetadata = "null"; // String | Additional data to pass to server
try {
ModelApiResponse result = apiInstance.uploadFileWithRequiredFile(petId, file, additionalMetadata);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling PetApi#uploadFileWithRequiredFile");
e.printStackTrace();
}
```
### Parameters
Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**petId** | **Long**| ID of pet to update |
**file** | **File**| file to upload | [default to null]
**additionalMetadata** | **String**| Additional data to pass to server | [optional] [default to null]
### Return type
[**ModelApiResponse**](ModelApiResponse.md)
### Authorization
[petstore_auth](../README.md#petstore_auth)
### HTTP request headers
- **Content-Type**: multipart/form-data
- **Accept**: application/json