mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-20 02:07:12 +00:00
[python-nextgen] add support for StrictBytes (#15365)
* add strictbyte support in python-nextgen client * update samples * use union of strictbytes, strictstr for backward compatibility
This commit is contained in:
@@ -121,6 +121,75 @@ public class BodyApi {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param body (optional)
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testBodyApplicationOctetstreamBinary(File body) throws ApiException {
|
||||
return this.testBodyApplicationOctetstreamBinary(body, Collections.emptyMap());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Test body parameter(s)
|
||||
* Test body parameter(s)
|
||||
* @param body (optional)
|
||||
* @param additionalHeaders additionalHeaders for this call
|
||||
* @return String
|
||||
* @throws ApiException if fails to make API call
|
||||
*/
|
||||
public String testBodyApplicationOctetstreamBinary(File body, Map<String, String> additionalHeaders) throws ApiException {
|
||||
Object localVarPostBody = body;
|
||||
|
||||
// create path and map variables
|
||||
String localVarPath = "/body/application/octetstream/binary";
|
||||
|
||||
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 = {
|
||||
"text/plain"
|
||||
};
|
||||
final String localVarAccept = apiClient.selectHeaderAccept(localVarAccepts);
|
||||
|
||||
final String[] localVarContentTypes = {
|
||||
"application/octet-stream"
|
||||
};
|
||||
final String localVarContentType = apiClient.selectHeaderContentType(localVarContentTypes);
|
||||
|
||||
String[] localVarAuthNames = new String[] { };
|
||||
|
||||
TypeReference<String> localVarReturnType = new TypeReference<String>() {};
|
||||
return apiClient.invokeAPI(
|
||||
localVarPath,
|
||||
"POST",
|
||||
localVarQueryParams,
|
||||
localVarCollectionQueryParams,
|
||||
localVarQueryStringJoiner.toString(),
|
||||
localVarPostBody,
|
||||
localVarHeaderParams,
|
||||
localVarCookieParams,
|
||||
localVarFormParams,
|
||||
localVarAccept,
|
||||
localVarContentType,
|
||||
localVarAuthNames,
|
||||
localVarReturnType
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Test free form object
|
||||
* Test free form object
|
||||
|
||||
Reference in New Issue
Block a user