EndpointOutput

sttp.tapir.EndpointOutput$
See theEndpointOutput companion trait

Attributes

Companion:
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Concise view

Type members

Classlikes

sealed trait Atom[T] extends Basic[T] with Atom[T]

Attributes

Graph
Supertypes
trait Atom[T]
trait Basic[T]
trait Basic[T]
trait Single[T]
class Object
trait Matchable
class Any
Known subtypes
trait Atom[I]
class Body[R, T]
class Empty[T]
class FixedHeader[T]
class Header[T]
class Headers[T]
class StreamBodyWrapper[BS, T]
class StatusCode[T]
class WebSocketBodyWrapper[PIPE_REQ_RESP, T]
sealed trait Basic[T] extends Single[T] with Basic[T]

Attributes

Graph
Supertypes
trait Basic[T]
trait Single[T]
class Object
trait Matchable
class Any
Known subtypes
trait Basic[I]
trait Atom[I]
class Body[R, T]
class Empty[T]
class FixedHeader[T]
class Header[T]
class Headers[T]
class StreamBodyWrapper[BS, T]
class OneOfBody[O, T]
trait Atom[T]
class StatusCode[T]
class WebSocketBodyWrapper[PIPE_REQ_RESP, T]
case class FixedStatusCode[T](statusCode: StatusCode, codec: Codec[Unit, T, TextPlain], info: Info[T]) extends Atom[T]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Atom[T]
trait Atom[T]
trait Basic[T]
trait Basic[T]
trait Single[T]
class Object
trait Matchable
class Any
case class MappedPair[T, U, TU, V](output: Pair[T, U, TU], mapping: Mapping[TU, V]) extends Single[V]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Single[V]
class Object
trait Matchable
class Any
case class OneOf[O, T](variants: List[OneOfVariant[_ <: O]], mapping: Mapping[O, T]) extends Single[T]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Single[T]
class Object
trait Matchable
class Any
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).

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class Pair[T, U, TU](left: EndpointOutput[T], right: EndpointOutput[U], combine: CombineParams, split: SplitParams) extends EndpointOutput[TU] with Pair[TU]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Pair[TU]
trait EndpointOutput[TU]
class Object
trait Matchable
class Any
sealed trait Single[T] extends EndpointOutput[T]

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Single[I]
trait Basic[I]
trait Atom[I]
class Body[R, T]
class Empty[T]
class FixedHeader[T]
class Header[T]
class Headers[T]
class StreamBodyWrapper[BS, T]
class OneOfBody[O, T]
class MappedPair[T, U, TU, V]
trait Basic[T]
trait Atom[T]
class StatusCode[T]
class WebSocketBodyWrapper[PIPE_REQ_RESP, T]
class MappedPair[T, U, TU, V]
class OneOf[O, T]
case class StatusCode[T](documentedCodes: Map[Either[StatusCode, StatusCodeRange], Info[Unit]], codec: Codec[StatusCode, T, TextPlain], info: Info[T]) extends Atom[T]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Atom[T]
trait Atom[T]
trait Basic[T]
trait Basic[T]
trait Single[T]
class Object
trait Matchable
class Any
case class Void[T]() extends EndpointOutput[T]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
case class WebSocketBodyWrapper[PIPE_REQ_RESP, T](wrapped: WebSocketBodyOutput[PIPE_REQ_RESP, _, _, T, _]) extends Atom[T]

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Atom[T]
trait Atom[T]
trait Basic[T]
trait Basic[T]
trait Single[T]
class Object
trait Matchable
class Any

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

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.

Attributes

Inherited from:
EndpointOutputMacros