All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.http4k.contract.NoRenderer.kt Maven / Gradle / Ivy

package org.http4k.contract

import org.http4k.core.Response
import org.http4k.core.Status.Companion.BAD_REQUEST
import org.http4k.core.Status.Companion.NOT_FOUND
import org.http4k.core.Status.Companion.OK
import org.http4k.lens.Failure

object NoRenderer : ContractRenderer {
    override fun description(contractRoot: PathSegments, security: Security, routes: List) = Response(OK)

    override fun badRequest(failures: List): Response = Response(BAD_REQUEST)

    override fun notFound(): Response = Response(NOT_FOUND)
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy