EndpointOutput

sttp.tapir.EndpointOutput
See theEndpointOutput companion trait

Attributes

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

Members list

Type members

Classlikes

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

Attributes

Supertypes
trait Atom[T]
trait Basic[T]
trait Basic[T]
trait Single[T]
trait EndpointOutput[T]
trait EndpointTransput[T]
class Object
trait Matchable
class Any
Show all
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 FixedStatusCode[T]
class StatusCode[T]
class WebSocketBodyWrapper[PIPE_REQ_RESP, T]
Show all
sealed trait Basic[T] extends Single[T], Basic[T]

Attributes

Supertypes
trait Basic[T]
trait Single[T]
trait EndpointOutput[T]
trait EndpointTransput[T]
class Object
trait Matchable
class Any
Show all
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 FixedStatusCode[T]
class StatusCode[T]
class WebSocketBodyWrapper[PIPE_REQ_RESP, T]
Show all
case class FixedStatusCode[T](statusCode: StatusCode, codec: Codec[Unit, T, TextPlain], info: Info[T]) extends Atom[T]

Attributes

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

Attributes

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

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Single[T]
trait EndpointOutput[T]
trait EndpointTransput[T]
class Object
trait Matchable
class Any
Show all
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

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

Attributes

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

Attributes

Supertypes
trait EndpointOutput[T]
trait EndpointTransput[T]
class Object
trait Matchable
class Any
Show all
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 FixedStatusCode[T]
class StatusCode[T]
class WebSocketBodyWrapper[PIPE_REQ_RESP, T]
class MappedPair[T, U, TU, V]
class OneOf[O, T]
Show all
case class StatusCode[T](documentedCodes: Map[Either[StatusCode, StatusCodeRange], Info[Unit]], codec: Codec[StatusCode, T, TextPlain], info: Info[T]) extends Atom[T]

Attributes

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

Attributes

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

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Atom[T]
trait Atom[T]
trait Basic[T]
trait Basic[T]
trait Single[T]
trait EndpointOutput[T]
trait EndpointTransput[T]
class Object
trait Matchable
class Any
Show all

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