All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scalatra.ServletApp.mustache Maven / Gradle / Ivy

There is a newer version: 3.0.0-rc1
Show newest version
{{>licenseInfo}}

package io.swagger.app

import org.scalatra.swagger.{ ApiInfo, SwaggerWithAuth, Swagger }
import org.scalatra.swagger.{ JacksonSwaggerBase, Swagger }
import org.scalatra.ScalatraServlet
import org.json4s.{ DefaultFormats, Formats }

class ResourcesApp(implicit protected val swagger: SwaggerApp)
  extends ScalatraServlet with JacksonSwaggerBase {
  before() {
    response.headers += ("Access-Control-Allow-Origin" -> "*")
  }
}

class SwaggerApp extends Swagger(apiInfo = ApiSwagger.apiInfo, apiVersion = "1.0", swaggerVersion = Swagger.SpecVersion)

object ApiSwagger {
  val apiInfo = ApiInfo(
    """{{{appName}}}""",
    """{{{appDescription}}}""",
    """{{{infoUrl}}}""",
    """{{{infoEmail}}}""",
    """{{{licenseInfo}}}""",
    """{{{licenseUrl}}}""")
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy