forked from loafle/openapi-generator-original
change java default lib to okhttp-gson
This commit is contained in:
@@ -790,6 +790,7 @@ public class ApiClient {
|
||||
* @throws ApiException If fail to deserialize response body, i.e. cannot read response body
|
||||
* or the Content-Type of the response is not supported.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T deserialize(Response response, Type returnType) throws ApiException {
|
||||
if (response == null || returnType == null) {
|
||||
return null;
|
||||
@@ -984,6 +985,7 @@ public class ApiClient {
|
||||
* @param returnType Return type
|
||||
* @param callback ApiCallback
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> void executeAsync(Call call, final Type returnType, final ApiCallback<T> callback) {
|
||||
call.enqueue(new Callback() {
|
||||
@Override
|
||||
|
||||
@@ -92,6 +92,7 @@ public class JSON {
|
||||
* @param returnType The type to deserialize inot
|
||||
* @return The deserialized Java object
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public <T> T deserialize(String body, Type returnType) {
|
||||
try {
|
||||
if (apiClient.isLenientOnJson()) {
|
||||
@@ -287,4 +288,4 @@ class LocalDateTypeAdapter extends TypeAdapter<LocalDate> {
|
||||
}
|
||||
}
|
||||
}
|
||||
{{/java8}}
|
||||
{{/java8}}
|
||||
|
||||
Reference in New Issue
Block a user