September 2018
Intermediate to advanced
398 pages
9h 43m
English
The installation is already done, thanks to the Gitter8 template we used to generate this project, so the following details are just for reference.
The integration that we use is based on the swagger-api/swagger-play GitHub repository; please refer to it for any updates. We have to add a reference to the library in build.sbt. The libraryDependencies variable must contain the following code:
"io.swagger" %% "swagger-play2" % "1.6.0"
Then, the module must be enabled by adding the following to application.conf:
play.modules.enabled += "play.modules.swagger.SwaggerModule"
From here, we can publish the JSON definition by adding the following route in the routes file:
GET /swagger.json controllers.ApiHelpController.getResources ...
Read now
Unlock full access