Support List in annotations and remove 'multiValueResponse'
Suggest we follow the implementation for other languages and parse the responseClass as a string such that List[Pet] will correspond to a list of pets, with support for the containers in the datatypes (https://github.com/wordnik/swagger-core/wiki/Datatypes) section of the wiki
A possible proper solution - http://jackson.codehaus.org/1.7.0/javadoc/org/codehaus/jackson/type/TypeReference.html Note the link in the class description.
Additional to issue #71.
Using java, if I set responseClass=Foo, and define Foo as below
public class Foo extends SuperFoo<Bar> {
}
I get this error
[error] c.w.s.p.HelpApi - Unable to load model documentation for Foo
java.lang.ClassCastException: sun.reflect.generics.reflectiveObjects.TypeVariabl
eImpl cannot be cast to java.lang.Class
at com.wordnik.swagger.core.ApiPropertiesReader$.getDataType(SpecReader.
scala:84) ~[swagger-core_2.9.1-1.2.0.jar:1.2.0]
at com.wordnik.swagger.core.ApiPropertiesReader$.getDataType(SpecReader.
scala:70) ~[swagger-core_2.9.1-1.2.0.jar:1.2.0]
at com.wordnik.swagger.jsonschema.ApiModelParser.parsePropertyAnnotation
s(SwaggerJsonSchemaProvider.scala:150) ~[swagger-core_2.9.1-1.2.0.jar:1.2.0]
at com.wordnik.swagger.jsonschema.ApiModelParser.com$wordnik$swagger$jso
nschema$ApiModelParser$$parseMethod(SwaggerJsonSchemaProvider.scala:96) ~[swagge
r-core_2.9.1-1.2.0.jar:1.2.0]
at com.wordnik.swagger.jsonschema.ApiModelParser$$anonfun$parseRecurrsiv
e$1.apply(SwaggerJsonSchemaProvider.scala:79) ~[swagger-core_2.9.1-1.2.0.jar:1.2
.0]
at com.wordnik.swagger.jsonschema.ApiModelParser$$anonfun$parseRecurrsiv
e$1.apply(SwaggerJsonSchemaProvider.scala:77) ~[swagger-core_2.9.1-1.2.0.jar:1.2
.0]
I am using
- Play 2.0.4 (java)
- "com.wordnik" %% "swagger-play2" % "1.2.0",
Hrm, seem to have done the pull request wrong. Issue #101 should have been created as a pull request to resolve this issue.
-Mike
This is handled in 1.2.1-SNAPSHOT.