EndpointOutput

Companion:
class
trait Sum
trait Mirror
class Object
trait Matchable
class Any

Type members

Classlikes

sealed trait Atom[T] extends Basic[T] with Atom[T]
sealed trait Basic[T] extends Single[T] with Basic[T]
case class FixedStatusCode[T](statusCode: StatusCode, codec: Codec[Unit, T, TextPlain], info: Info[T]) extends Atom[T]
case class MappedPair[T, U, TU, V](output: Pair[T, U, TU], mapping: Mapping[TU, V]) extends Single[V]
case class OneOf[O, T](variants: List[OneOfVariant[_ <: O]], mapping: Mapping[O, T]) extends Single[T]
case class OneOfVariant[O]

Specifies one possible output.

Specifies one possible output.

When encoding to a response, this output is used if:

  1. appliesTo applied to the output value (as returned by the server logic) returns true.
  2. when a fixed content type specified by the output matches the request's Accept header

When decoding from a response, this output is used if it decodes successfully.

The appliesTo function should determine, whether a runtime value matches the type O. This check cannot be in general done by checking the run-time class of the value, due to type erasure (if O has type parameters).

case class Pair[T, U, TU](left: EndpointOutput[T], right: EndpointOutput[U], combine: CombineParams, split: SplitParams) extends EndpointOutput[TU] with Pair[TU]
sealed trait Single[T] extends EndpointOutput[T]
case class StatusCode[T](documentedCodes: Map[Either[StatusCode, StatusCodeRange], Info[Unit]], codec: Codec[StatusCode, T, TextPlain], info: Info[T]) extends Atom[T]
case class Void[T]() extends EndpointOutput[T]
case class WebSocketBodyWrapper[PIPE_REQ_RESP, T](wrapped: WebSocketBodyOutput[PIPE_REQ_RESP, _, _, T, _]) extends Atom[T]

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Inherited from:
Mirror

Value members

Inherited methods

inline def derived[T <: Product]: EndpointOutput[T]

Derives an output description using metadata specified with annotations on the given case class. Each field of the case class must be annotated with one of the annotations from sttp.tapir.EndpointIO.annotations. Additional schema meta-data can be specified using annotations from sttp.tapir.Schema.annotations. The result is mapped to an instance of the T type.

Derives an output description using metadata specified with annotations on the given case class. Each field of the case class must be annotated with one of the annotations from sttp.tapir.EndpointIO.annotations. Additional schema meta-data can be specified using annotations from sttp.tapir.Schema.annotations. The result is mapped to an instance of the T type.

Inherited from:
EndpointOutputMacros