swagger-play24

WARNING

Project is most likely obsoleted by: https://github.com/swagger-api/swagger-play

===

This is a 'direct' move of Swagger support for Play (2.3) to (2.4) This project does not try to be too clever and has a very few changes comparing to original code.

Library version Play Version Swagger Spec version Scala Version
1.1 2.4 1.2 2.10
1.2 2.4 1.2 2.10
1.3 2.4 1.2 2.10, 2.11
1.4 2.4 1.2 2.10, 2.11

Note: swagger-core 1.5 is not yet supported, so annotations from io.swagger.annotations._ will be ignored! Use com.wordnik.swagger.annotations._instead.

Installation

add to your build.sbt

libraryDependencies += "pl.matisoft" %% "swagger-play24" % "1.4"

and then add as an example to your routes file:

GET     /api-docs   @pl.matisoft.swagger.ApiHelpController.getResources

application.conf:

api.version=1.0.0
swagger.api.basepath=http://localhost:9000

application.conf - config options

api.version (String) - version of API | default: "beta"
swagger.api.basepath (String) - base url | default: "http://localhost:9000"
swagger.filter (String) - classname of swagger filter | default: empty

Usage

Once library is hooked up it is possible to add swagger annotation to classes and methods. The exact documentation and example is available on a swagger web page.

Scala Support

Java Support

Notes

Library automatically instantiates two classes (eagerly) upon startup:

ChangeLog

Disable