forked from loafle/openapi-generator-original
use standard constant for UTF8 charset in generated java api clients (#7828)
This commit is contained in:
parent
5dae270c3e
commit
659b00a4f9
@ -16,7 +16,6 @@ import java.net.URLEncoder;
|
|||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
{{#java8}}
|
{{#java8}}
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
@ -29,6 +28,8 @@ import java.util.StringJoiner;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration and utility class for API clients.
|
* Configuration and utility class for API clients.
|
||||||
*
|
*
|
||||||
@ -45,8 +46,6 @@ import java.util.stream.Collectors;
|
|||||||
{{>generatedAnnotation}}
|
{{>generatedAnnotation}}
|
||||||
public class ApiClient {
|
public class ApiClient {
|
||||||
|
|
||||||
private static final Charset UTF_8 = Charset.forName("UTF-8");
|
|
||||||
|
|
||||||
private HttpClient.Builder builder;
|
private HttpClient.Builder builder;
|
||||||
private ObjectMapper mapper;
|
private ObjectMapper mapper;
|
||||||
private String scheme;
|
private String scheme;
|
||||||
|
@ -25,7 +25,6 @@ import java.net.URLEncoder;
|
|||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@ -36,6 +35,8 @@ import java.util.StringJoiner;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration and utility class for API clients.
|
* Configuration and utility class for API clients.
|
||||||
*
|
*
|
||||||
@ -52,8 +53,6 @@ import java.util.stream.Collectors;
|
|||||||
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient {
|
public class ApiClient {
|
||||||
|
|
||||||
private static final Charset UTF_8 = Charset.forName("UTF-8");
|
|
||||||
|
|
||||||
private HttpClient.Builder builder;
|
private HttpClient.Builder builder;
|
||||||
private ObjectMapper mapper;
|
private ObjectMapper mapper;
|
||||||
private String scheme;
|
private String scheme;
|
||||||
|
@ -25,7 +25,6 @@ import java.net.URLEncoder;
|
|||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@ -36,6 +35,8 @@ import java.util.StringJoiner;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration and utility class for API clients.
|
* Configuration and utility class for API clients.
|
||||||
*
|
*
|
||||||
@ -52,8 +53,6 @@ import java.util.stream.Collectors;
|
|||||||
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient {
|
public class ApiClient {
|
||||||
|
|
||||||
private static final Charset UTF_8 = Charset.forName("UTF-8");
|
|
||||||
|
|
||||||
private HttpClient.Builder builder;
|
private HttpClient.Builder builder;
|
||||||
private ObjectMapper mapper;
|
private ObjectMapper mapper;
|
||||||
private String scheme;
|
private String scheme;
|
||||||
|
@ -25,7 +25,6 @@ import java.net.URLEncoder;
|
|||||||
import java.net.http.HttpClient;
|
import java.net.http.HttpClient;
|
||||||
import java.net.http.HttpRequest;
|
import java.net.http.HttpRequest;
|
||||||
import java.net.http.HttpResponse;
|
import java.net.http.HttpResponse;
|
||||||
import java.nio.charset.Charset;
|
|
||||||
import java.time.Duration;
|
import java.time.Duration;
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
@ -36,6 +35,8 @@ import java.util.StringJoiner;
|
|||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configuration and utility class for API clients.
|
* Configuration and utility class for API clients.
|
||||||
*
|
*
|
||||||
@ -52,8 +53,6 @@ import java.util.stream.Collectors;
|
|||||||
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
@javax.annotation.processing.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen")
|
||||||
public class ApiClient {
|
public class ApiClient {
|
||||||
|
|
||||||
private static final Charset UTF_8 = Charset.forName("UTF-8");
|
|
||||||
|
|
||||||
private HttpClient.Builder builder;
|
private HttpClient.Builder builder;
|
||||||
private ObjectMapper mapper;
|
private ObjectMapper mapper;
|
||||||
private String scheme;
|
private String scheme;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user