forked from loafle/openapi-generator-original
remove errorObjectType from java okhttp-gson (#12345)
This commit is contained in:
parent
bc71ed9cbb
commit
29323f38a3
@ -333,7 +333,6 @@ public class {{classname}} {
|
||||
return localVarApiClient.executeStream(localVarCall, localVarReturnType);
|
||||
} catch (ApiException e) {
|
||||
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}>(){}.getType()));
|
||||
e.setErrorObjectType(new GenericType<{{{errorObjectType}}}>(){});
|
||||
throw e;
|
||||
}
|
||||
{{/errorObjectType}}
|
||||
@ -355,7 +354,6 @@ public class {{classname}} {
|
||||
return localVarApiClient.execute(localVarCall, localVarReturnType);
|
||||
} catch (ApiException e) {
|
||||
e.setErrorObject(localVarApiClient.getJSON().getGson().fromJson(e.getResponseBody(), new TypeToken<{{{errorObjectType}}}>(){}.getType()));
|
||||
e.setErrorObjectType(new GenericType<{{{errorObjectType}}}>(){});
|
||||
throw e;
|
||||
}
|
||||
{{/errorObjectType}}
|
||||
|
@ -22,7 +22,6 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us
|
||||
private String responseBody = null;
|
||||
{{#errorObjectType}}
|
||||
private {{{errorObjectType}}} errorObject = null;
|
||||
private GenericType errorObjectType = null;
|
||||
{{/errorObjectType}}
|
||||
|
||||
/**
|
||||
@ -174,24 +173,6 @@ public class ApiException extends{{#useRuntimeException}} RuntimeException {{/us
|
||||
}
|
||||
{{#errorObjectType}}
|
||||
|
||||
/**
|
||||
* Get the error object type.
|
||||
*
|
||||
* @return Error object type
|
||||
*/
|
||||
public GenericType getErrorObjectType() {
|
||||
return errorObjectType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the error object type.
|
||||
*
|
||||
* @param errorObjectType object type
|
||||
*/
|
||||
public void setErrorObjectType(GenericType errorObjectType) {
|
||||
this.errorObjectType = errorObjectType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the error object.
|
||||
*
|
||||
|
Loading…
x
Reference in New Issue
Block a user