value for @ApiModelProperty not showing up for lists

238 views
Skip to first unread message

frances elliott

unread,
Nov 23, 2015, 10:39:00 AM11/23/15
to Swagger
Hi!

I've noticed that about 7 properties in the GET endpoints I'm documenting don't display values, and I think the common thread is that these properties return lists. For example:


provenance returns a list:





This happens for about 7 properties I've encountered.




--------Background:-----------------

I'm working with swagger annotations  1.5.3.

Code example for provenance:

import com.wordnik.swagger.annotations.ApiModelProperty;
import com.wordnik.swagger.annotations.ApiModel;

[...]
    @ApiModelProperty(value="The provenance from which [blah]")
    public List<String> getProvenance() {
        return provenance;
    }





tony tam

unread,
Nov 23, 2015, 1:29:30 PM11/23/15
to swagger-sw...@googlegroups.com
What does the swagger JSON look like for this model?

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Frances C. Elliott

unread,
Nov 24, 2015, 10:01:09 AM11/24/15
to swagger-sw...@googlegroups.com
here's the model schema (I marked where I abbreviated with [...], marked bold attributes for which no description shows up in model tab):


{ "entityTypes": [ { "objectType": { "typeType": "string", "typeName": "string", "typeClass": "string", "typeVersion": "string", "typeProvenance": [ "string" ], "typeDesc": "string", "typeSuperType": "string", "typeCreateDate": "string", "typeUpdateDate": "string", "typeFixedAttributes": [ { "name": "string", "type": "string", "description": "string", "values": [ {} ], "searchable": true,
"unique": true,
[...] } ], "typeVariableAttributes": { "name": "string", "type": "string", "description": "string", "values": [ {} ], "searchable": true, "unique": true, [...] } } } ] }



--
You received this message because you are subscribed to a topic in the Google Groups "Swagger" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/swagger-swaggersocket/ZCg4UZYYn08/unsubscribe.
To unsubscribe from this group and all its topics, send an email to swagger-swaggers...@googlegroups.com.

Ron

unread,
Dec 1, 2015, 3:14:26 PM12/1/15
to Swagger
We need the way it is described in the swagger.json itself, not what's presented in the UI.
To unsubscribe from this group and all its topics, send an email to swagger-swaggersocket+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages