6

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

I followed this tutorial and it worked, but only for the older version of Play and not working with Play-2.5. As the project has migrated into Play-2.5, we had to remove the swagger configuration.

Firstly, the issue seemed to be with static controller vs non static controller in Play-2.5, but I ended up with proving myself wrong. I am facing this error

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

If any one knows any link for Swagger configuration with Play-2.5 for Java, please guide.

PS: there are tutorials available for Scala not for java.

2
  • Actually your question is about 'a way to integrate Swagger with Play-2.5'. Basically, it is not a problem whether you are doing a Java project or Scala project unless if there's a problem with annotator libraries . Commented May 19, 2016 at 7:35
  • I am facing the same problem, :) Commented Aug 22, 2016 at 6:16

3 Answers 3

1

Try this repo:

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

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

Sign up to request clarification or add additional context in comments.

3 Comments

this for scala not java, Do you have for java play.?
It is for Java play. I'm currently using it with Java, not scala.
Could you guide how to integrate step by step , thanks
0

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

If you want a quick start you can take a look at their Activator Template - just run it and you will get the Swagger generated documentation (Swagger UI is already included). From there you can start tweaking it (look for the conf/echo.yaml file).

1 Comment

I have seen this before but again this all help out there for older versions and for Scala. I am looking for java with play 2.5.
0

The problem is, the com.wordnik swagger-play2(What your tutorial is using as a library) breaks with Play 2.4 and up. You can try this which uses a different one (io.swagger). I have used this and it works well with 2.4. But it also breaks with 2.5.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.