Closed anton-johansson closed 9 years ago
Yes, you can group by path:
<enunciate>
<modules>
<jaxrs groupBy="path"/>
Is that what you were looking for?
I tried that, but it didn't give me the results I was looking for. Diving into the code, it doesn't look like this is what I'm after either. The grouping is not an issue, but rather the order of the groups.
Let me explain using an image:
Here we have three service classes. We have divided our operations into various scopes, depending on the usage. /estore serves data from a NoSQL layer, while /admin serves data directly to the master relational database.
However, we don't currently prefix the classes "Estore" and "Admin". So the three service classes are actually called:
I would like to see the CategoryService being sorted after the other two services, according to the @Path
annotation order.
We might be better of just prefixing the service classes properly, but I still think the proper order should be according to @Path
. What do you think?
Oh, I see. That makes sense. Yes, I think the path-based sorting seems reasonable. I'll get it fixed.
Fixed at b7b4b57.
Fix was included in Milestone 4.
In order to not dictate the sort order, the @com.webcohesion.enunciate.metadata.rs.ResourceLabel
annotation was enhanced to provide a sortKey
that can be used to fix the sorting algorithm of each resource group.
In the new template for Enunciate version 2, the resources seems to be ordered by their services class name. Is there any possibility to order them by the service classes
@Path
annotation? At least in my case, it would give me a much better order of the resources.