Configuring Swagger with Play / Java-framework-2.5

I am trying to configure Swagger in my Play-2.5 project.

I followed this tutorial and it worked, but only for the old version of Play and does not work with Play-2.5. When the project switched to Play-2.5, we had to remove the swagger configuration.

First, the problem seemed to be in the static controller versus the non-stationary controller in Play-2.5, but I ended up in the proof that I was wrong. I ran into this error

type ApiHelpController is not a member of package controllers GET /api-docs controllers.ApiHelpController.getResources 

If anyone knows any link to configure Swagger with Play-2.5 for Java , see the manual.

PS: non- java tutorials are available for Scala.

+6
source share
3 answers

Try this repo:

https://github.com/CreditCardsCom/swagger-play

I created this as a temporary solution until we get support for Play 2.5 in the official swagger-play regatta.

+1
source

I used only the Zalando Play-Swagger project . There is a lot of documentation, and the repo is kept up to date.

If you want to get started quickly, you can take a look at their Activator Template - just run it and you will get the documentation created by Swagger (Swagger interface is already included). From there, you can start configuring it (find the conf/echo.yaml ).

0
source

The problem is that com.wordnik swagger-play2 (what your tutorial uses as a library) breaks with Play 2.4 and higher. You can try this , which uses another (io.swagger). I used this and it works well with 2.4. But it also breaks down with 2.5.

0
source

All Articles