swagger-api/swagger-play

Route rule with optional package name for controllers (Play2.7)

sfelix77 opened this issue · 1 comments

In the file SwaggerPlugin.scala (line 139), the rule doesn't match the good name because the package name is optional. I try to fix that with the following line :

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

ApiOperation doesn't work without a fix

Indeed, thanks @sfelix77 for finding this bug. @frantuma, could you please merge my pull request that fix this? Thanks. :)