File tree 1 file changed +3
-2
lines changed
modules/swagger-jersey2-jaxrs/src/main/scala/com/wordnik/swagger/jersey/listing
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ import scala.collection.mutable.LinkedHashMap
26
26
import scala .collection .JavaConverters ._
27
27
import scala .collection .mutable .ListBuffer
28
28
29
- object ApiListingCache {
29
+ object ApiListingCache extends ReaderUtil {
30
30
private val LOGGER = LoggerFactory .getLogger(ApiListingCache .getClass)
31
31
32
32
var _cache : Option [Map [String , ApiListing ]] = None
@@ -42,7 +42,8 @@ object ApiListingCache {
42
42
}
43
43
// For each top level resource, parse it and look for swagger annotations.
44
44
val listings = (for (cls <- classes) yield reader.read(docRoot, cls, ConfigFactory .config)).flatten.toList
45
- _cache = Some ((listings.map(m => {
45
+ val mergedListings = groupByResourcePath(listings)
46
+ _cache = Some ((mergedListings.map(m => {
46
47
// always start with "/"
47
48
val resourcePath = m.resourcePath.startsWith (" /" ) match {
48
49
case true => m.resourcePath
You can’t perform that action at this time.
0 commit comments