Specifying order of Resources and Operations in 1.5.0

1,396 views
Skip to first unread message

Steven Schwell

unread,
Jun 10, 2015, 1:53:03 PM6/10/15
to swagger-sw...@googlegroups.com
Now that "position" is deprecated in both @Api and @ApiOperation annotations,
how do we specify the order that Resources and Operations should appear in the ui?

Ron Ratovsky

unread,
Jun 10, 2015, 1:55:38 PM6/10/15
to swagger-sw...@googlegroups.com
Check out the apisSorter property in https://github.com/swagger-api/swagger-ui#parameters.

On Wed, Jun 10, 2015 at 1:53 PM, Steven Schwell <ssch...@jibe.com> wrote:
Now that "position" is deprecated in both @Api and @ApiOperation annotations,
how do we specify the order that Resources and Operations should appear in the ui?

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

Steven Schwell

unread,
Jun 10, 2015, 2:33:47 PM6/10/15
to swagger-sw...@googlegroups.com
Thanks for the suggestion, but I don't see how that helps to specify the order in which Resources appear in the UI, or the order in which operations appear within a resource.
I don't want to alphabetize them, or some other arbitrary order; I want to specify the order explicitly.
Is there a sample I can look at?

The "position" parameter in the annotations seemed to be a nice solution. Do you know why that was deprecated?

Thanks
s.



On Wednesday, June 10, 2015 at 1:55:38 PM UTC-4, Ron wrote:
Check out the apisSorter property in https://github.com/swagger-api/swagger-ui#parameters.
On Wed, Jun 10, 2015 at 1:53 PM, Steven Schwell <ssch...@jibe.com> wrote:
Now that "position" is deprecated in both @Api and @ApiOperation annotations,
how do we specify the order that Resources and Operations should appear in the ui?

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ron Ratovsky

unread,
Jun 10, 2015, 2:40:43 PM6/10/15
to swagger-sw...@googlegroups.com

Because it's a map. There's no way to specify order in a map.

On Jun 10, 2015 2:33 PM, "Steven Schwell" <ssch...@jibe.com> wrote:
Thanks for the suggestion, but I don't see how that helps to specify the order in which Resources appear in the UI, or the order in which operations appear within a resource.
I don't want to alphabetize them, or some other arbitrary order; I want to specify the order explicitly.
Is there a sample I can look at?

The "position" parameter in the annotations seemed to be a nice solution. Do you know why that was deprecated?

Thanks
s.



On Wednesday, June 10, 2015 at 1:55:38 PM UTC-4, Ron wrote:
Check out the apisSorter property in https://github.com/swagger-api/swagger-ui#parameters.
On Wed, Jun 10, 2015 at 1:53 PM, Steven Schwell <ssch...@jibe.com> wrote:
Now that "position" is deprecated in both @Api and @ApiOperation annotations,
how do we specify the order that Resources and Operations should appear in the ui?

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.

Steven Schwell

unread,
Jun 10, 2015, 3:08:47 PM6/10/15
to swagger-sw...@googlegroups.com
Well there are Map implementations that preserve order, e.g. LinkedHashMap

But bottom line, this is functionality that we lost in the upgrade, right?



On Wednesday, June 10, 2015 at 2:40:43 PM UTC-4, Ron wrote:

Because it's a map. There's no way to specify order in a map.

On Jun 10, 2015 2:33 PM, "Steven Schwell" <ssch...@jibe.com> wrote:
Thanks for the suggestion, but I don't see how that helps to specify the order in which Resources appear in the UI, or the order in which operations appear within a resource.
I don't want to alphabetize them, or some other arbitrary order; I want to specify the order explicitly.
Is there a sample I can look at?

The "position" parameter in the annotations seemed to be a nice solution. Do you know why that was deprecated?

Thanks
s.



On Wednesday, June 10, 2015 at 1:55:38 PM UTC-4, Ron wrote:
Check out the apisSorter property in https://github.com/swagger-api/swagger-ui#parameters.
On Wed, Jun 10, 2015 at 1:53 PM, Steven Schwell <ssch...@jibe.com> wrote:
Now that "position" is deprecated in both @Api and @ApiOperation annotations,
how do we specify the order that Resources and Operations should appear in the ui?

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Jun 10, 2015, 3:29:33 PM6/10/15
to swagger-sw...@googlegroups.com
I'm talking about a JSON map which is used to represent it. By definition (theirs, not mine), there's no guarantee for order in those.
So yes, that functionality was removed, whether we wanted to or not.

On Wed, Jun 10, 2015 at 3:08 PM, Steven Schwell <ssch...@jibe.com> wrote:
Well there are Map implementations that preserve order, e.g. LinkedHashMap

But bottom line, this is functionality that we lost in the upgrade, right?


On Wednesday, June 10, 2015 at 2:40:43 PM UTC-4, Ron wrote:

Because it's a map. There's no way to specify order in a map.

On Jun 10, 2015 2:33 PM, "Steven Schwell" <ssch...@jibe.com> wrote:
Thanks for the suggestion, but I don't see how that helps to specify the order in which Resources appear in the UI, or the order in which operations appear within a resource.
I don't want to alphabetize them, or some other arbitrary order; I want to specify the order explicitly.
Is there a sample I can look at?

The "position" parameter in the annotations seemed to be a nice solution. Do you know why that was deprecated?

Thanks
s.



On Wednesday, June 10, 2015 at 1:55:38 PM UTC-4, Ron wrote:
Check out the apisSorter property in https://github.com/swagger-api/swagger-ui#parameters.
On Wed, Jun 10, 2015 at 1:53 PM, Steven Schwell <ssch...@jibe.com> wrote:
Now that "position" is deprecated in both @Api and @ApiOperation annotations,
how do we specify the order that Resources and Operations should appear in the ui?

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.

--
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.

Steven Schwell

unread,
Jun 10, 2015, 3:34:56 PM6/10/15
to swagger-sw...@googlegroups.com
Yeah I found https://github.com/swagger-api/swagger-core/issues/1050 which really should not have been closed.

Now I have to decide whether to do the upgrade or not. This will be hard to explain to the users. :(




On Wednesday, June 10, 2015 at 3:29:33 PM UTC-4, Ron wrote:
I'm talking about a JSON map which is used to represent it. By definition (theirs, not mine), there's no guarantee for order in those.
So yes, that functionality was removed, whether we wanted to or not.
On Wed, Jun 10, 2015 at 3:08 PM, Steven Schwell <ssch...@jibe.com> wrote:
Well there are Map implementations that preserve order, e.g. LinkedHashMap

But bottom line, this is functionality that we lost in the upgrade, right?


On Wednesday, June 10, 2015 at 2:40:43 PM UTC-4, Ron wrote:

Because it's a map. There's no way to specify order in a map.

On Jun 10, 2015 2:33 PM, "Steven Schwell" <ssch...@jibe.com> wrote:
Thanks for the suggestion, but I don't see how that helps to specify the order in which Resources appear in the UI, or the order in which operations appear within a resource.
I don't want to alphabetize them, or some other arbitrary order; I want to specify the order explicitly.
Is there a sample I can look at?

The "position" parameter in the annotations seemed to be a nice solution. Do you know why that was deprecated?

Thanks
s.



On Wednesday, June 10, 2015 at 1:55:38 PM UTC-4, Ron wrote:
Check out the apisSorter property in https://github.com/swagger-api/swagger-ui#parameters.
On Wed, Jun 10, 2015 at 1:53 PM, Steven Schwell <ssch...@jibe.com> wrote:
Now that "position" is deprecated in both @Api and @ApiOperation annotations,
how do we specify the order that Resources and Operations should appear in the ui?

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ron Ratovsky

unread,
Jun 10, 2015, 3:39:52 PM6/10/15
to swagger-sw...@googlegroups.com
Yup, and I replied there as well.

However, I have missed the operationsSorter parameter for the UI that would allow you to sort the operations as well. As far as I know, this can be your own method so you can sort the operations however you like for display.

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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.

Steven Schwell

unread,
Jun 10, 2015, 3:47:04 PM6/10/15
to swagger-sw...@googlegroups.com
Nah, thats not good either. We can't have a custom sorter and custom ui for every swagger api we come across. The order really does need to be encapsulated in the resource itself, probably via the annotations.

Anyways, thanks for your help!
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ron Ratovsky

unread,
Jun 10, 2015, 3:51:25 PM6/10/15
to swagger-sw...@googlegroups.com
The order is a presentation matter, not a documentation matter.

I can think of a way to help with it, but it'd still require something custom in the UI.

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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.

Steven Schwell

unread,
Jun 10, 2015, 3:59:37 PM6/10/15
to swagger-sw...@googlegroups.com
really? order is not a documentation matter?
are you serious? :)

If so, then Swagger may not be the framework for our documentation needs.
Thanks again.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Ron Ratovsky

unread,
Jun 10, 2015, 4:04:16 PM6/10/15
to swagger-sw...@googlegroups.com
Order implies a state/workflow which some find to not follow REST APIs standards.

I'm not saying there aren't cases where it may be needed, and it can be solved, but would require an extension to the UI as well.

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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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.

Anshu Jain

unread,
Apr 15, 2016, 10:20:26 PM4/15/16
to Swagger
Was there a solution found to this problem which doesnt need explicit manual UI ordering? I find it hard to understand how documentation should not allow ordering. 
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.



--
-----------------------------------------
http://swagger.io
https://twitter.com/SwaggerApi
-----------------------------------------

--
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-swaggersocket+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages