scalatra.ServletApp.mustache Maven / Gradle / Ivy
{{>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}}}""")
}