[python-nextgen] Fix binary response (#15076)

* fix binary response in python nextgen client

* update samples
This commit is contained in:
William Cheng
2023-03-31 16:16:58 +08:00
committed by GitHub
parent 05fa5601dd
commit b59d535176
36 changed files with 906 additions and 75 deletions

View File

@@ -20,6 +20,7 @@ import org.openapitools.client.Configuration;
import org.openapitools.client.model.*;
import org.openapitools.client.Pair;
import java.io.File;
import org.openapitools.client.model.Pet;
@@ -52,6 +53,73 @@ public class BodyApi {
this.apiClient = apiClient;
}
/**
* Test binary (gif) response body
* Test binary (gif) response body
* @return File
* @throws ApiException if fails to make API call
*/
public File testBinaryGif() throws ApiException {
return this.testBinaryGif(Collections.emptyMap());
}
/**
* Test binary (gif) response body
* Test binary (gif) response body
* @param additionalHeaders additionalHeaders for this call
* @return File
* @throws ApiException if fails to make API call
*/
public File testBinaryGif(Map<String, String> additionalHeaders) throws ApiException {
Object localVarPostBody = null;
// create path and map variables
String localVarPath = "/binary/gif";
StringJoiner localVarQueryStringJoiner = new StringJoiner("&");
String localVarQueryParameterBaseName;
List<Pair> localVarQueryParams = new ArrayList<Pair>();
List<Pair> localVarCollectionQueryParams = new ArrayList<Pair>();
Map<String, String> localVarHeaderParams = new HashMap<String, String>();
Map<String, String> localVarCookieParams = new HashMap<String, String>();
Map<String, Object> localVarFormParams = new HashMap<String, Object>();
localVarHeaderParams.putAll(additionalHeaders);
final String[] localVarAccepts = {
"image/gif"
};
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
final String[] localVarContentTypes = {
};
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
String[] localVarAuthNames = new String[] { };
TypeReference<File> localVarReturnType = new TypeReference<File>() {};
return apiClient.invokeAPI(
localVarPath,
"POST",
localVarQueryParams,
localVarCollectionQueryParams,
localVarQueryStringJoiner.toString(),
localVarPostBody,
localVarHeaderParams,
localVarCookieParams,
localVarFormParams,
localVarAccept,
localVarContentType,
localVarAuthNames,
localVarReturnType
);
}
/**
* Test body parameter(s)
* Test body parameter(s)