This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package router | |
import service.BibService | |
import model.Bib | |
import org.scalatra.swagger.Swagger | |
import spray.json._ | |
import DefaultJsonProtocol._ | |
import format.ApiFormats._ | |
/** |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
abstract class RouterBase(val swagger: Swagger) extends ScalatraServlet with JacksonJsonSupport with SwaggerSupport { | |
protected implicit val jsonFormats: Formats = DefaultFormats | |
mapper.registerModule(new JodaModule()) | |
before() { | |
contentType = formats("json") | |
} | |
} |
NewerOlder