mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
added default string response to api template [android-volley]
This commit is contained in:
parent
e098e8f372
commit
f3ff567d3f
@ -105,7 +105,12 @@ public class {{classname}} {
|
||||
@Override
|
||||
public void onResponse(String response) {
|
||||
try {
|
||||
responseListener.onResponse({{returnType}}) ApiInvoker.deserialize(response, "array", Phone.class));
|
||||
{{#returnType}}
|
||||
responseListener.onResponse(({{{returnType}}}) ApiInvoker.deserialize(response, "array", {{returnBaseType}}.class));
|
||||
{{/returnType}}
|
||||
{{^returnType}}
|
||||
responseListener.onResponse(response);
|
||||
{{/returnType}}
|
||||
} catch (ApiException exception) {
|
||||
//TODO onError
|
||||
Log.d("ERROR", "error");
|
||||
|
Loading…
Reference in New Issue
Block a user