Merge remote-tracking branch 'origin/master' into 7.0.x

This commit is contained in:
William Cheng
2023-05-10 15:00:56 +08:00
2319 changed files with 61134 additions and 22322 deletions

View File

@@ -159,9 +159,12 @@ Class | Method | HTTP request | Description
<a id="documentation-for-authorization"></a>
## Documentation for Authorization
Authentication schemes defined for the API:
<a id="api_key"></a>
### api_key
@@ -169,6 +172,7 @@ Authentication schemes defined for the API:
- **API key parameter name**: X-Api-Key
- **Location**: HTTP header
<a id="api_key_query"></a>
### api_key_query

View File

@@ -807,7 +807,17 @@ public class ApiClient extends JavaTimeFormatter {
File file = (File) param.getValue();
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey())
.fileName(file.getName()).size(file.length()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, MediaType.APPLICATION_OCTET_STREAM_TYPE));
// Attempt to probe the content type for the file so that the form part is more correctly
// and precisely identified, but fall back to application/octet-stream if that fails.
MediaType type;
try {
type = MediaType.valueOf(Files.probeContentType(file.toPath()));
} catch (IOException | IllegalArgumentException e) {
type = MediaType.APPLICATION_OCTET_STREAM_TYPE;
}
multiPart.bodyPart(new FormDataBodyPart(contentDisp, file, type));
} else {
FormDataContentDisposition contentDisp = FormDataContentDisposition.name(param.getKey()).build();
multiPart.bodyPart(new FormDataBodyPart(contentDisp, parameterToString(param.getValue())));

View File

@@ -15,6 +15,8 @@ package org.openapitools.client;
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
public class Configuration {
public static final String VERSION = "1.0.0";
private static ApiClient defaultApiClient = new ApiClient();
/**