forked from loafle/openapi-generator-original
updated to use swagger 1.1.0
This commit is contained in:
parent
236a9697ad
commit
e2dbe61adf
@ -1,8 +1,11 @@
|
||||
package com.wordnik.client;
|
||||
package {{package}};
|
||||
|
||||
import com.wordnik.swagger.core.util.JsonUtil;
|
||||
|
||||
import org.codehaus.jackson.type.JavaType;
|
||||
import com.fasterxml.jackson.core.JsonGenerator.Feature;
|
||||
import com.fasterxml.jackson.databind.*;
|
||||
import com.fasterxml.jackson.annotation.*;
|
||||
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
|
||||
|
||||
import com.sun.jersey.api.client.Client;
|
||||
import com.sun.jersey.api.client.ClientResponse;
|
||||
@ -38,7 +41,7 @@ public class ApiInvoker {
|
||||
public static Object deserialize(String json, String containerType, Class cls) throws ApiException {
|
||||
try{
|
||||
if("List".equals(containerType)) {
|
||||
JavaType typeInfo = org.codehaus.jackson.map.type.TypeFactory.collectionType(List.class, cls);
|
||||
JavaType typeInfo = JsonUtil.getJsonMapper().getTypeFactory().constructCollectionType(List.class, cls);
|
||||
List response = (List<?>) JsonUtil.getJsonMapper().readValue(json, typeInfo);
|
||||
return response;
|
||||
}
|
||||
|
@ -213,7 +213,7 @@
|
||||
|
||||
<properties>
|
||||
<jersey-version>1.7</jersey-version>
|
||||
<swagger-core-version>1.02-SNAPSHOT</swagger-core-version>
|
||||
<swagger-core-version>1.1.0</swagger-core-version>
|
||||
<scala-version>2.9.1-1</scala-version>
|
||||
<junit-version>4.8.1</junit-version>
|
||||
<maven-plugin.version>1.0.0</maven-plugin.version>
|
||||
|
Loading…
x
Reference in New Issue
Block a user