[Golang][client] fix formData file parameter name use (#506)

* support form-data file MIME `name` parameter

* update test spec and Go client for form-data file name

* update samples for ensure-up-to-date

* update mustache template

* update samples for Go client

* improve assignment location

* update samples
This commit is contained in:
John Wang
2018-07-12 11:53:38 -05:00
committed by William Cheng
parent 93832340a5
commit 19fd48e33b
101 changed files with 536 additions and 489 deletions

View File

@@ -227,7 +227,7 @@ public interface PetApi {
* Sync method
*
* @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
*/
@@ -235,14 +235,14 @@ public interface PetApi {
@retrofit.http.Multipart
@POST("/fake/{petId}/uploadImageWithRequiredFile")
ModelApiResponse uploadFileWithRequiredFile(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("requiredFile") TypedFile requiredFile, @retrofit.http.Part("additionalMetadata") String additionalMetadata
);
/**
* uploads an image (required)
* Async method
* @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)
* @param cb callback method
*/
@@ -250,6 +250,6 @@ public interface PetApi {
@retrofit.http.Multipart
@POST("/fake/{petId}/uploadImageWithRequiredFile")
void uploadFileWithRequiredFile(
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("file") TypedFile file, @retrofit.http.Part("additionalMetadata") String additionalMetadata, Callback<ModelApiResponse> cb
@retrofit.http.Path("petId") Long petId, @retrofit.http.Part("requiredFile") TypedFile requiredFile, @retrofit.http.Part("additionalMetadata") String additionalMetadata, Callback<ModelApiResponse> cb
);
}