rebuilt clients

This commit is contained in:
Tony Tam
2015-02-17 21:37:51 -08:00
parent 2550539495
commit 9ae106affd
10 changed files with 31 additions and 28 deletions

View File

@@ -51,8 +51,11 @@ public class ApiInvoker {
}
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
if(null != containerType) {
containerType = containerType.toLowerCase();
}
try{
if("List".equals(containerType)) {
if("list".equals(containerType) || "array".equals(containerType)) {
JavaType typeInfo = JsonUtil.getJsonMapper().getTypeFactory().constructCollectionType(List.class, cls);
List response = (List<?>) JsonUtil.getJsonMapper().readValue(json, typeInfo);
return response;

View File

@@ -1,8 +1,8 @@
package io.swagger.client.model;
import io.swagger.client.model.Category;
import java.util.*;
import io.swagger.client.model.Tag;
import java.util.*;
import com.wordnik.swagger.annotations.*;
import com.fasterxml.jackson.annotation.JsonProperty;