fix the scalatra sample

This commit is contained in:
Ivan Porto Carrero 2012-09-20 23:38:08 -07:00
parent 0504f68b41
commit 256e746364
4 changed files with 4 additions and 0 deletions

View File

@ -15,6 +15,7 @@ class PetApi (implicit val swagger: Swagger) extends ScalatraServlet with TypedP
protected implicit val jsonFormats: Formats = DefaultFormats protected implicit val jsonFormats: Formats = DefaultFormats
protected val applicationDescription: String = "PetApi" protected val applicationDescription: String = "PetApi"
override protected val applicationName = Some("pet")
def swaggerToModel(cls: Class[_]) = { def swaggerToModel(cls: Class[_]) = {
val docObj = ApiPropertiesReader.read(cls) val docObj = ApiPropertiesReader.read(cls)

View File

@ -15,6 +15,7 @@ class StoreApi (implicit val swagger: Swagger) extends ScalatraServlet with Type
protected implicit val jsonFormats: Formats = DefaultFormats protected implicit val jsonFormats: Formats = DefaultFormats
protected val applicationDescription: String = "StoreApi" protected val applicationDescription: String = "StoreApi"
override protected val applicationName = Some("store")
def swaggerToModel(cls: Class[_]) = { def swaggerToModel(cls: Class[_]) = {
val docObj = ApiPropertiesReader.read(cls) val docObj = ApiPropertiesReader.read(cls)

View File

@ -15,6 +15,7 @@ class UserApi (implicit val swagger: Swagger) extends ScalatraServlet with Typed
protected implicit val jsonFormats: Formats = DefaultFormats protected implicit val jsonFormats: Formats = DefaultFormats
protected val applicationDescription: String = "UserApi" protected val applicationDescription: String = "UserApi"
override protected val applicationName = Some("user")
def swaggerToModel(cls: Class[_]) = { def swaggerToModel(cls: Class[_]) = {
val docObj = ApiPropertiesReader.read(cls) val docObj = ApiPropertiesReader.read(cls)

View File

@ -16,6 +16,7 @@ class {{className}} (implicit val swagger: Swagger) extends ScalatraServlet with
protected implicit val jsonFormats: Formats = DefaultFormats protected implicit val jsonFormats: Formats = DefaultFormats
protected val applicationDescription: String = "{{className}}" protected val applicationDescription: String = "{{className}}"
override protected val applicationName: String = Some("{{name}}")
def swaggerToModel(cls: Class[_]) = { def swaggerToModel(cls: Class[_]) = {
val docObj = ApiPropertiesReader.read(cls) val docObj = ApiPropertiesReader.read(cls)