mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-07 18:06:08 +00:00
[JAVA] Address [rawtypes] and [this-escape] warnings in generated API clients (#20466)
* Address [rawtypes] and [this-escape] warnings in generated API clients * Commit updated sample files
This commit is contained in:
@@ -540,7 +540,7 @@ public class ApiClient extends JavaTimeFormatter {
|
||||
* @param value The value of the parameter.
|
||||
* @return A list of {@code Pair} objects.
|
||||
*/
|
||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Collection value) {
|
||||
public List<Pair> parameterToPairs(String collectionFormat, String name, Collection<?> value) {
|
||||
List<Pair> params = new ArrayList<Pair>();
|
||||
|
||||
// preconditions
|
||||
|
||||
@@ -192,7 +192,7 @@ public class ApiClient {
|
||||
asyncResponseInterceptor = null;
|
||||
}
|
||||
|
||||
protected ObjectMapper createDefaultObjectMapper() {
|
||||
public static ObjectMapper createDefaultObjectMapper() {
|
||||
ObjectMapper mapper = new ObjectMapper();
|
||||
mapper.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||
@@ -206,11 +206,11 @@ public class ApiClient {
|
||||
return mapper;
|
||||
}
|
||||
|
||||
protected String getDefaultBaseUri() {
|
||||
private String getDefaultBaseUri() {
|
||||
return "http://localhost:3000";
|
||||
}
|
||||
|
||||
protected HttpClient.Builder createDefaultHttpClientBuilder() {
|
||||
public static HttpClient.Builder createDefaultHttpClientBuilder() {
|
||||
return HttpClient.newBuilder();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user