1

Facing problem while configuring swagger api with play 2.4 framework.

Follow this url for configuration : https://github.com/swagger-api/swagger-play/tree/master/play-2.4/swagger-play2

After configuration gets a compile time error with message "type ApiHelpController is not a member of package controllers" as this ApiHelpController.scala file is present in app/controllers package.

Does anyone knows what i am missing.

front_end_dev
  • 1,998
  • 1
  • 9
  • 14

2 Answers2

1

Not sure what you are missing but let me show you an alternative for swagger play 2.4 integration

Unlike the one you were trying to use, this one does not require annotation, you write swagger spec directly in your routes files as comment. There are several benefits of this approach:

  1. controller remain clean
  2. you don't need to repeat path and parameters
  3. you don't need to learn another API (the annotation api)

Also it generates swagger definition from case classes reflection.

Check it out: https://github.com/iheartradio/play-swagger

KailuoWang
  • 1,304
  • 1
  • 12
  • 24
1

Not sure about swagger-jaxrs, but swagger-play2 package works for me. You can refer to http://swagger.io/playing-with-swagger-using-swagger-and-swagger-ui-with-the-play-framework/

xitter
  • 708
  • 5
  • 15