Forum Discussion

hodesagustin's avatar
hodesagustin
Occasional Visitor
2 years ago

Two different REST endpoints to same method

I'm using Play Framework for Scala, and have two different endpoints (/foo & /bar), and both run the same method. I've defined both routes

/foo    com.test.User.listUsers
/bar    com.test.User.listUsers

I've also placed @ApiOperation, @ApiResponses & @ApiImplicitParams in the method and Api in the class.

But when I access localhost:9000/swagger, there's an entry for /bar with all the explanation, but not for /foo.

Is there a way to have both appear? Or I need to create a proxy method that calls listUsers (e.g. listUsers2, and point one endpoint to that) ??

Thank you!

No RepliesBe the first to reply