io.fintrospect.renderers.ModuleRenderer.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fintrospect_2.10 Show documentation
Show all versions of fintrospect_2.10 Show documentation
Library that adds self-documentation to Finagle server endpoint services
package io.fintrospect.renderers
import com.twitter.finagle.http.Status.NotFound
import com.twitter.finagle.http.path.Path
import com.twitter.finagle.http.{Request, Response}
import io.fintrospect.ServerRoute
import io.fintrospect.parameters.{InvalidParameter, Security}
/**
* This is used to render the various standard responses (bad request/the description route).
* Provide one of these to implement a pluggable custom format for module responses.
*/
trait ModuleRenderer {
def notFound(request: Request): Response = Response(NotFound)
def badRequest(badParameters: Seq[InvalidParameter]): Response
def description(basePath: Path, security: Security, routes: Seq[ServerRoute[_, _]]): Response
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy