This file contains 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
import xerial.lens.ObjectSchema | |
class RequestDispatcher { | |
// Prepare mappings from a path to ObjectSchema of an WebApp class | |
private val webAppMapping = { | |
// ObjectSchema contains a list of methods | |
for(cl <- webAppClasses; schema <- ObjectSchema.of(cl)) yield { | |
val basePath = m.findAnnotaionOf[path].map(_.value)getOrElse("/" + schema.name) | |
basePath -> schema |