sttp.tapir.server.model.ValuedEndpointOutput.scala Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tapir-server_3 Show documentation
Show all versions of tapir-server_3 Show documentation
Core classes for server interpreters & interceptors
package sttp.tapir.server.model
import sttp.tapir.EndpointOutput
case class ValuedEndpointOutput[T](output: EndpointOutput[T], value: T) {
def prepend[U](otherOutput: EndpointOutput[U], otherValue: U): ValuedEndpointOutput[(U, T)] =
ValuedEndpointOutput(otherOutput.and(output), (otherValue, value))
def append[U](otherOutput: EndpointOutput[U], otherValue: U): ValuedEndpointOutput[(T, U)] =
ValuedEndpointOutput(output.and(otherOutput), (value, otherValue))
}