Skip to content
This repository was archived by the owner on Sep 14, 2022. It is now read-only.

Commit 9ba2176

Browse files
authored
Merge pull request #200 from notflorian/bugfix/route-rule-package-name
Fix route rule with optional package name for controllers
2 parents 441c9a4 + 7f8a63d commit 9ba2176

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

play-2.7/swagger-play2/app/play/modules/swagger/SwaggerPlugin.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class SwaggerPluginImpl @Inject()(lifecycle: ApplicationLifecycle, router: Route
136136
parseRoutesHelper(routesFile, "")
137137
}
138138

139-
val routesRules = routes.map(route => s"${route.call.packageName}.${route.call.controller}$$.${route.call.method}" -> route).toMap
139+
val routesRules = routes.map(route => s"${route.call.packageName.map(_ + ".").getOrElse("")}${route.call.controller}$$.${route.call.method}" -> route).toMap
140140

141141
val route = new RouteWrapper(routesRules.asJava)
142142
RouteFactory.setRoute(route)

0 commit comments

Comments
 (0)