swagger-api / swagger-play

Apache License 2.0
330 stars 181 forks source link

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

Closed sfelix77 closed 5 years ago

sfelix77 commented 5 years ago

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

notflorian commented 5 years ago

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