EndpointInput

sttp.tapir.EndpointInput
See theEndpointInput companion object
sealed trait EndpointInput[T] extends EndpointTransput[T]

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait EndpointIO[T]
class Pair[T, U, TU]
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]
class Pair[T, U, TU]
trait Single[T]
class Auth[T, TYPE]
trait Basic[T]
trait Atom[T]
class Cookie[T]
class FixedMethod[T]
class FixedPath[T]
class PathCapture[T]
class PathsCapture[T]
class Query[T]
class QueryParams[T]
class MappedPair[T, U, TU, V]

Members list

Concise view

Value members

Concrete methods

def /[U, TU](other: EndpointInput[U])(implicit concat: Aux[T, U, TU]): EndpointInput[TU]
def and[U, TU](other: EndpointInput[U])(implicit concat: Aux[T, U, TU]): EndpointInput[TU]

Inherited methods

def map[U](f: T => U)(g: U => T): ThisType[U]

Attributes

Inherited from:
EndpointTransput
def map[U](mapping: Mapping[T, U]): ThisType[U]

Attributes

Inherited from:
EndpointTransput
def mapDecode[U](f: T => DecodeResult[U])(g: U => T): ThisType[U]

Attributes

Inherited from:
EndpointTransput
inline def mapTo[CASE_CLASS <: Product](using mc: ProductOf[CASE_CLASS]): ThisType[CASE_CLASS]

Attributes

Inherited from:
EndpointTransputMacros
def mapValidate[U](v: Validator[T])(f: T => U)(g: U => T): ThisType[U]

Adds the given validator, and maps to the given higher-level type U.

Adds the given validator, and maps to the given higher-level type U.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create inputs/outputs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also:
Inherited from:
EndpointTransput
def show: String

Attributes

Inherited from:
EndpointTransput
def validate(v: Validator[T]): ThisType[T]

Adds a validator.

Adds a validator.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also:
Inherited from:
EndpointTransput