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: 7.8.0
Show newest version
{{>licenseInfo}}

package {{invokerPackage}}.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: OpenAPIApp)
  extends ScalatraServlet with JacksonSwaggerBase {
  before() {
    response.headers += ("Access-Control-Allow-Origin" -> "*")
  }
}

class OpenAPIApp extends Swagger(apiInfo = OpenAPIInfo.apiInfo, apiVersion = "1.0", swaggerVersion = Swagger.SpecVersion)

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy