Skip to content

Latest commit

 

History

History
 
 

scala-play2-no-format

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

Swagger Playframework Sample App

Overview

This is a scala project to build a stand-alone server which implements the Swagger spec. You can find out more about both the spec and the framework at http://swagger.wordnik.com. For more information about Wordnik's APIs, please visit http://developer.wordnik.com. There is an online version of this server at http://petstore.swagger.wordnik.com/api/resources.json

To build from source

Please follow instructions to build the top-level swagger-core project

To run

The swagger-play2 module lives in a github repository, currently not in maven central. You'll have to add a dependency and a resolver to your Build.scala like this:

  val appDependencies: Seq[sbt.ModuleID] = Seq(
    /* your other dependencies */
    "com.wordnik" %% "swagger-play2" % "1.1.1")

  val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
    Resolver.url("swagger-core-github-repo", url("http://wordnik.github.com/repository"))(Resolver.ivyStylePatterns),
    /* your other resolvers */
    )
}

then you can build the sample app:

play run

The application will listen on port 9000 and respond to http://localhost:9000/resources