Skip to content

Commit 99c0709

Browse files
committed
Merge pull request #501 from junbo/develop
Merge ApiListing in swagger-jersey2-jaxrs
2 parents 40a62c3 + cd41390 commit 99c0709

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

Diff for: modules/swagger-jersey2-jaxrs/src/main/scala/com/wordnik/swagger/jersey/listing/ApiListing.scala

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import scala.collection.mutable.LinkedHashMap
2626
import scala.collection.JavaConverters._
2727
import scala.collection.mutable.ListBuffer
2828

29-
object ApiListingCache {
29+
object ApiListingCache extends ReaderUtil {
3030
private val LOGGER = LoggerFactory.getLogger(ApiListingCache.getClass)
3131

3232
var _cache: Option[Map[String, ApiListing]] = None
@@ -42,7 +42,8 @@ object ApiListingCache {
4242
}
4343
// For each top level resource, parse it and look for swagger annotations.
4444
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 => {
4647
// always start with "/"
4748
val resourcePath = m.resourcePath.startsWith ("/") match {
4849
case true => m.resourcePath

0 commit comments

Comments
 (0)