forked from loafle/openapi-generator-original
[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:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user