Order of the REST APIs in api-docs and on UI

815 views
Skip to first unread message

Sahar

unread,
Oct 17, 2013, 4:22:07 PM10/17/13
to swagger-sw...@googlegroups.com
Hi Tony,

What is the logic behind ordering the APIs in the documentation? Is it based on the order of the corresponding methods or is it based on the depth of the path in the @Path annotation? It seems to be ordering by depth first and then method. 

Thanks,
Sahar

tony tam

unread,
Oct 17, 2013, 4:35:48 PM10/17/13
to swagger-sw...@googlegroups.com
Hi Sahar,
For each @Api annotated resource, paths are grouped then sorted by position annotation value, if it exists.

Sahar

unread,
Oct 17, 2013, 7:18:49 PM10/17/13
to swagger-sw...@googlegroups.com
Thanks Tony, but what do you mean by "position annotation value"? Can you provide an example? thanks

f.ter...@shaa.it

unread,
Oct 23, 2013, 5:57:55 AM10/23/13
to swagger-sw...@googlegroups.com
Hi Sahar, if you take a look at the com.wordnik.swagger.annotations.Api class (the one associated with the @Api annotation) you can see a "position" property, used to set the ordering of the api in the resources listing.

tony tam

unread,
Oct 23, 2013, 11:24:54 AM10/23/13
to swagger-sw...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages