forked from loafle/openapi-generator-original
Merge remote-tracking branch 'origin/master' into 7.0.x
This commit is contained in:
@@ -259,9 +259,12 @@ Class | Method | HTTP request | Description
|
||||
- [Zebra](docs/Zebra.md)
|
||||
|
||||
|
||||
<a id="documentation-for-authorization"></a>
|
||||
## Documentation for Authorization
|
||||
|
||||
|
||||
Authentication schemes defined for the API:
|
||||
<a id="petstore_auth"></a>
|
||||
### petstore_auth
|
||||
|
||||
|
||||
@@ -272,6 +275,7 @@ Authentication schemes defined for the API:
|
||||
- write:pets: modify pets in your account
|
||||
- read:pets: read your pets
|
||||
|
||||
<a id="api_key"></a>
|
||||
### api_key
|
||||
|
||||
|
||||
@@ -279,6 +283,7 @@ Authentication schemes defined for the API:
|
||||
- **API key parameter name**: api_key
|
||||
- **Location**: HTTP header
|
||||
|
||||
<a id="api_key_query"></a>
|
||||
### api_key_query
|
||||
|
||||
|
||||
@@ -286,16 +291,19 @@ Authentication schemes defined for the API:
|
||||
- **API key parameter name**: api_key_query
|
||||
- **Location**: URL query string
|
||||
|
||||
<a id="http_basic_test"></a>
|
||||
### http_basic_test
|
||||
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
<a id="bearer_test"></a>
|
||||
### bearer_test
|
||||
|
||||
|
||||
- **Type**: HTTP basic authentication
|
||||
|
||||
<a id="http_signature_test"></a>
|
||||
### http_signature_test
|
||||
|
||||
|
||||
|
||||
@@ -981,7 +981,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())));
|
||||
|
||||
@@ -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();
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user