LiveClientEndpointFactory

works.iterative.tapir.LiveClientEndpointFactory
See theLiveClientEndpointFactory companion object

Attributes

Companion
object
Graph
Supertypes
trait CustomTapir
trait SttpClientInterpreter
trait SttpClientInterpreterExtensions
trait TapirAliases
trait TapirJsonZio
trait Tapir
trait ModifyMacroSupport
trait ModifyMacroFunctorSupport
trait TapirStaticContentEndpoints
trait TapirComputedInputs
trait TapirExtensions
class Object
trait Matchable
class Any
Show all

Members list

Type members

Inherited classlikes

class BinaryBodyPartiallyApplied[R](rbt: Binary[R])

Attributes

Inherited from:
Tapir
Supertypes
class Object
trait Matchable
class Any
implicit class ModifyEach[F[_], T](t: F[T])(implicit f: ModifyFunctor[F, T])

Attributes

Inherited from:
ModifyMacroFunctorSupport
Supertypes
class Object
trait Matchable
class Any
implicit class ModifyEachMap[F[_, _], K, T](t: F[K, T])(implicit fac: Factory[(K, T), F[K, T]])

Attributes

Inherited from:
ModifyMacroSupport
Supertypes
class Object
trait Matchable
class Any
trait ModifyFunctor[F[_], A]

Attributes

Inherited from:
ModifyMacroFunctorSupport
Supertypes
class Object
trait Matchable
class Any

Attributes

Inherited from:
TapirComputedInputs
Supertypes
class Object
trait Matchable
class Any
final class WebSocketBodyBuilder[REQ, REQ_CF <: CodecFormat, RESP, RESP_CF <: CodecFormat]

Attributes

Inherited from:
Tapir
Supertypes
class Object
trait Matchable
class Any

Inherited types

type AnyEndpoint = AnyEndpoint

Attributes

Inherited from:
TapirAliases
type AnyListCodec = AnyListCodec

Attributes

Inherited from:
TapirAliases
type AnyPart = AnyPart

Attributes

Inherited from:
TapirAliases
type AttributeKey[T] = AttributeKey[T]

attribute.scala

attribute.scala

Attributes

Inherited from:
TapirAliases
type AttributeMap = AttributeMap

attribute.scala

attribute.scala

Attributes

Inherited from:
TapirAliases
type Codec[L, H, CF <: CodecFormat] = Codec[L, H, CF]

Codec.scala

Codec.scala

Attributes

Inherited from:
TapirAliases
type CodecFormat = CodecFormat

CodecFormat.scala

CodecFormat.scala

Attributes

Inherited from:
TapirAliases
type DecodeResult[+T] = DecodeResult[T]

DecodeResult.scala

DecodeResult.scala

Attributes

Inherited from:
TapirAliases
type Endpoint[A, I, E, O, -R] = Endpoint[A, I, E, O, R]

Endpoint.scala

Endpoint.scala

Attributes

Inherited from:
TapirAliases
type EndpointIO[I] = EndpointIO[I]

EndpointIO.scala

EndpointIO.scala

Attributes

Inherited from:
TapirAliases
type EndpointInfo = EndpointInfo

Endpoint.scala

Endpoint.scala

Attributes

Inherited from:
TapirAliases
type EndpointInput[I] = EndpointInput[I]

EndpointIO.scala

EndpointIO.scala

Attributes

Inherited from:
TapirAliases
type EndpointOutput[O] = EndpointOutput[O]

EndpointIO.scala

EndpointIO.scala

Attributes

Inherited from:
TapirAliases
type FieldName = FieldName

FieldName.scala

FieldName.scala

Attributes

Inherited from:
TapirAliases
type FileRange = FileRange

FileRange.scala

FileRange.scala

Attributes

Inherited from:
TapirAliases
type InputStreamRange = InputStreamRange

InputStreamRange.scala

InputStreamRange.scala

Attributes

Inherited from:
TapirAliases
type MultipartCodec[T] = MultipartCodec[T]

Codec.scala

Codec.scala

Attributes

Inherited from:
TapirAliases
type PartCodec[R, T] = PartCodec[R, T]

Codec.scala

Codec.scala

Attributes

Inherited from:
TapirAliases
type PublicEndpoint[INPUT, ERROR_OUTPUT, OUTPUT, -R] = PublicEndpoint[INPUT, ERROR_OUTPUT, OUTPUT, R]

Attributes

Inherited from:
TapirAliases
type RangeValue = RangeValue

FileRange.scala

FileRange.scala

Attributes

Inherited from:
TapirAliases
type RawBodyType[R] = RawBodyType[R]

Codec.scala

Codec.scala

Attributes

Inherited from:
TapirAliases
type RawPart = RawPart

package.scala

package.scala

Attributes

Inherited from:
TapirAliases
type Schema[T] = Schema[T]

Schema.scala

Schema.scala

Attributes

Inherited from:
TapirAliases
type SchemaAnnotations[T] = SchemaAnnotations[T]

SchemaAnnotations.scala

SchemaAnnotations.scala

Attributes

Inherited from:
TapirAliases
type SchemaType[T] = SchemaType[T]

SchemaType.scala

SchemaType.scala

Attributes

Inherited from:
TapirAliases
type StreamBodyIO[BS, T, S] = StreamBodyIO[BS, T, S]

EndpointIO.scala

EndpointIO.scala

Attributes

Inherited from:
TapirAliases
type Tapir = Tapir

Tapir.scala

Tapir.scala

Attributes

Inherited from:
TapirAliases
type TapirFile = File

Attributes

Inherited from:
TapirExtensions
type ValidationError[T] = ValidationError[T]

Validator.scala

Validator.scala

Attributes

Inherited from:
TapirAliases
type ValidationResult = ValidationResult

Validator.scala

Validator.scala

Attributes

Inherited from:
TapirAliases
type WebSocketBodyOutput[PIPE_REQ_RESP, REQ, RESP, T, S] = WebSocketBodyOutput[PIPE_REQ_RESP, REQ, RESP, T, S]

EndpointIO.scala

EndpointIO.scala

Attributes

Inherited from:
TapirAliases

Deprecated and Inherited types

type StreamBody[BS, T, S] = StreamBodyIO[BS, T, S]

EndpointIO.scala

EndpointIO.scala

Attributes

Deprecated
Use StreamBodyIO instead
Inherited from:
TapirAliases

Value members

Concrete methods

override def make[S, I, E, O](endpoint: Endpoint[S, I, E, O, ZioStreams & WebSockets])(using ext: BaseUriExtractor[O], em: ClientErrorConstructor[E], m: ClientResultConstructor[S, I, em.Error, O]): m.Result

Attributes

Definition Classes
def makeRequest[S, I, E, O](endpoint: Endpoint[S, I, E, O, ZioStreams & WebSockets])(using ext: BaseUriExtractor[O]): S => I => Request[DecodeResult[Either[E, O]], ZioStreams & WebSockets]

Inherited methods

def auth: TapirAuth.type

Inputs which describe authentication credentials with metadata.

Inputs which describe authentication credentials with metadata.

Attributes

Inherited from:
Tapir
def binaryBody[R](rbt: Binary[R]): BinaryBodyPartiallyApplied[R]

Usage:

Usage:

binaryBody(RawBodyType.FileBody)[MyType]

, given that a codec between a file and MyType is available in the implicit scope.

Attributes

Inherited from:
Tapir
def byteArrayBody: Body[Array[Byte], Array[Byte]]

Attributes

Inherited from:
Tapir
def byteBufferBody: Body[ByteBuffer, ByteBuffer]

Attributes

Inherited from:
Tapir
def clientIp: EndpointInput[Option[String]]

Attributes

Inherited from:
TapirComputedInputs
def cookies: Header[List[Cookie]]

Attributes

Inherited from:
Tapir
def customCodecJsonBody[T : JsonCodec]: Body[String, T]

Requires an implicit Codec.JsonCodec in scope. Such a codec can be created using Codec.json.

Requires an implicit Codec.JsonCodec in scope. Such a codec can be created using Codec.json.

However, json codecs are usually derived from json-library-specific implicits. That's why integrations with various json libraries define jsonBody methods, which directly require the library-specific implicits.

Unless you have defined a custom json codec, the jsonBody methods should be used.

Attributes

Inherited from:
Tapir
def emptyOutputAs[T](value: T): Atom[T]

An empty output. Useful if one of the oneOf branches of a coproduct type is a case object that should be mapped to an empty body.

An empty output. Useful if one of the oneOf branches of a coproduct type is a case object that should be mapped to an empty body.

Attributes

Inherited from:
Tapir
def extractFromRequest[T](f: ServerRequest => T): ExtractFromRequest[T]

Extract a value from a server request. This input is only used by server interpreters, it is ignored by documentation interpreters and the provided value is discarded by client interpreters.

Extract a value from a server request. This input is only used by server interpreters, it is ignored by documentation interpreters and the provided value is discarded by client interpreters.

Attributes

Inherited from:
Tapir
def fileBody: Body[FileRange, TapirFile]

Attributes

Inherited from:
Tapir
def fileRangeBody: Body[FileRange, FileRange]

Attributes

Inherited from:
Tapir
def formBody[T : ([T] =>> Codec[String, T, XWwwFormUrlencoded])](charset: Charset): Body[String, T]

Attributes

Inherited from:
Tapir
def formBody[T : ([T] =>> Codec[String, T, XWwwFormUrlencoded])]: Body[String, T]

Attributes

Inherited from:
Tapir
def header(name: String, value: String): FixedHeader[Unit]

Attributes

Inherited from:
Tapir
def header(h: Header): FixedHeader[Unit]

Attributes

Inherited from:
Tapir
def header[T : ([T] =>> Codec[List[String], T, TextPlain])](name: String): Header[T]

Attributes

Inherited from:
Tapir
def headers: Headers[List[Header]]

Attributes

Inherited from:
Tapir
def inputStreamBody: Body[InputStream, InputStream]

Attributes

Inherited from:
Tapir
def inputStreamRangeBody: Body[InputStreamRange, InputStreamRange]

Attributes

Inherited from:
Tapir
def isWebSocket: EndpointInput[Boolean]

Attributes

Inherited from:
TapirComputedInputs
def jsonBody[T : Schema]: Body[String, T]

Attributes

Inherited from:
TapirJsonZio
def jsonBodyWithRaw[T : Schema]: Body[String, (String, T)]

Attributes

Inherited from:
TapirJsonZio
def jsonQuery[T : Schema](name: String): Query[T]

Attributes

Inherited from:
TapirJsonZio
def makeClient[I, E, O](endpoint: PublicEndpoint[I, E, O, Any])(using baseUri: BaseUri, backend: Backend, wsToPipe: WebSocketToPipe[Any]): I => IO[E, O]

Attributes

Inherited from:
CustomTapirPlatformSpecific
def multipartBody[T](implicit multipartCodec: MultipartCodec[T]): Body[Seq[RawPart], T]

Attributes

Inherited from:
Tapir
def oneOf[T](firstVariant: OneOfVariant[_ <: T], otherVariants: OneOfVariant[_ <: T]*): OneOf[T, T]

An output which contains a number of variant outputs. Each variant can contain different outputs and represent different content. To describe an output which represents same content, but with different content types, use oneOfBody.

An output which contains a number of variant outputs. Each variant can contain different outputs and represent different content. To describe an output which represents same content, but with different content types, use oneOfBody.

All possible outputs must have a common supertype (T). Typically, the supertype is a sealed trait, and the variants are implementing case classes.

When encoding to a response, the first matching output is chosen, using the following rules:

  1. the variant's appliesTo method, applied to the output value (as returned by the server logic) must return true.
  2. when a fixed content type is specified by the output, it must match the request's Accept header (if present). This implements content negotiation.

When decoding from a response, the first output which decodes successfully is chosen.

The outputs might vary in status codes, headers (e.g. different content types), and body implementations. However, for bodies, only replayable ones can be used, and they need to have the same raw representation (e.g. all byte-array-base, or all file-based).

Note that exhaustiveness of the variants (that all subtypes of T are covered) is not checked.

Attributes

Inherited from:
Tapir
def oneOfBody[T](first: (ContentTypeRange, StreamBodyWrapper[_, T]), second: (ContentTypeRange, StreamBodyWrapper[_, T]), others: (ContentTypeRange, StreamBodyWrapper[_, T])*): OneOfBody[T, T]

Streaming variant of oneOfBody.

Streaming variant of oneOfBody.

Allows explicitly specifying the content type range, for which each body will be used, instead of defaulting to the exact media type as specified by the body's codec. This is only used when choosing which body to decode.

Attributes

Inherited from:
Tapir
def oneOfBody[T](first: (ContentTypeRange, Body[_, T]), others: (ContentTypeRange, Body[_, T])*): OneOfBody[T, T]

See oneOfBody.

See oneOfBody.

Allows explicitly specifying the content type range, for which each body will be used, instead of defaulting to the exact media type as specified by the body's codec. This is only used when choosing which body to decode.

Attributes

Inherited from:
Tapir
def oneOfBody[T](first: StreamBodyWrapper[_, T], others: StreamBodyWrapper[_, T]*): OneOfBody[T, T]

Streaming variant of oneOfBody.

Streaming variant of oneOfBody.

Attributes

Inherited from:
Tapir
def oneOfBody[T](first: Body[_, T], others: Body[_, T]*): OneOfBody[T, T]

A body input or output, which can be one of the given variants. All variants should represent T instances using different content types. Hence, the content type is used as a discriminator to choose the appropriate variant.

A body input or output, which can be one of the given variants. All variants should represent T instances using different content types. Hence, the content type is used as a discriminator to choose the appropriate variant.

Should be used to describe an input or output which represents the same content, but using different content types. For an output which describes variants including possibly different outputs (representing different content), see oneOf.

The server behavior is as follows:

  • when encoding to a response, the first variant matching the request's Accept header is chosen (if present). Otherwise, the first variant is used. This implements content negotiation.
  • when decoding a request, the variant corresponding to the request's Content-Type header is chosen (if present). Otherwise, a decode failure is returned, which by default results in an 415 Unsupported Media Type response.

The client behavior is as follows:

  • when encoding a request, the first variant is used.
  • when decoding a response, the variant corresponding to the response's Content-Type header is chosen (if present). Otherwise, the first variant is used. For client interpreters to work correctly, all body variants must have the same raw type (e.g. all are string-based or all byte-array-based)

All possible bodies must have the same type T. Typically, the bodies will vary in the Codecs that are used for the body.

Attributes

Inherited from:
Tapir
def oneOfDefaultVariant[T](output: EndpointOutput[T]): OneOfVariant[T]

Create a fallback variant to be used in oneOf output descriptions. Multiple such variants can be specified, with different body content types.

Create a fallback variant to be used in oneOf output descriptions. Multiple such variants can be specified, with different body content types.

Attributes

Inherited from:
Tapir
def oneOfVariant[T : ErasureSameAsType](code: StatusCode, output: EndpointOutput[T]): OneOfVariant[T]

Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the runtime class of T. Adds a fixed status-code output with the given value.

Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the runtime class of T. Adds a fixed status-code output with the given value.

This will fail at compile-time if the type erasure of T is different from T, as a runtime check in this situation would give invalid results. In such cases, use oneOfVariantClassMatcher, oneOfVariantValueMatcher or oneOfVariantFromMatchType instead.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariant[T : ErasureSameAsType](output: EndpointOutput[T]): OneOfVariant[T]

Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the runtime class of T.

Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the runtime class of T.

This will fail at compile-time if the type erasure of T is different from T, as a runtime check in this situation would give invalid results. In such cases, use oneOfVariantClassMatcher, oneOfVariantValueMatcher or oneOfVariantFromMatchType instead.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariantClassMatcher[T](code: StatusCode, output: EndpointOutput[T], runtimeClass: Class[_]): OneOfVariant[T]

Create a one-of-variant which uses output i the class of the provided value (when interpreting as a server) matches the given runtimeClass. Note that this does not take into account type erasure. Adds a fixed status-code output with the given value.

Create a one-of-variant which uses output i the class of the provided value (when interpreting as a server) matches the given runtimeClass. Note that this does not take into account type erasure. Adds a fixed status-code output with the given value.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariantClassMatcher[T](output: EndpointOutput[T], runtimeClass: Class[_]): OneOfVariant[T]

Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the given runtimeClass. Note that this does not take into account type erasure.

Create a one-of-variant which uses output if the class of the provided value (when interpreting as a server) matches the given runtimeClass. Note that this does not take into account type erasure.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariantExactMatcher[T : ClassTag](code: StatusCode, output: EndpointOutput[T])(firstExactValue: T, rest: T*): OneOfVariant[T]

Create a one-of-variant which uses output if the provided value exactly matches one of the values provided in the second argument list. Adds a fixed status-code output with the given value.

Create a one-of-variant which uses output if the provided value exactly matches one of the values provided in the second argument list. Adds a fixed status-code output with the given value.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariantExactMatcher[T : ClassTag](output: EndpointOutput[T])(firstExactValue: T, rest: T*): OneOfVariant[T]

Create a one-of-variant which uses output if the provided value exactly matches one of the values provided in the second argument list.

Create a one-of-variant which uses output if the provided value exactly matches one of the values provided in the second argument list.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariantFromMatchType[T : MatchType](code: StatusCode, output: EndpointOutput[T]): OneOfVariant[T]

Create a one-of-variant which uses output if the provided value matches the target type, as checked by MatchType. Instances of MatchType are automatically derived and recursively check that classes of all fields match, to bypass issues caused by type erasure. Adds a fixed status-code output with the given value.

Create a one-of-variant which uses output if the provided value matches the target type, as checked by MatchType. Instances of MatchType are automatically derived and recursively check that classes of all fields match, to bypass issues caused by type erasure. Adds a fixed status-code output with the given value.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariantFromMatchType[T : MatchType](output: EndpointOutput[T]): OneOfVariant[T]

Create a one-of-variant which uses output if the provided value matches the target type, as checked by MatchType. Instances of MatchType are automatically derived and recursively check that classes of all fields match, to bypass issues caused by type erasure.

Create a one-of-variant which uses output if the provided value matches the target type, as checked by MatchType. Instances of MatchType are automatically derived and recursively check that classes of all fields match, to bypass issues caused by type erasure.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariantSingletonMatcher[T](code: StatusCode)(singletonValue: T): OneOfVariant[T]

Create a one-of-variant which will use a fixed status-code output with the given value, if the provided value equals the singleton value. The entire variant is typed with the singleton's type T.

Create a one-of-variant which will use a fixed status-code output with the given value, if the provided value equals the singleton value. The entire variant is typed with the singleton's type T.

Should be used in oneOf output descriptions.

Attributes

See also

oneOfVariantExactMatcher which allows specifying more exact-match values, and where output needs to correspond to type T.

Inherited from:
Tapir
def oneOfVariantSingletonMatcher[T](code: StatusCode, output: EndpointOutput[Unit])(singletonValue: T): OneOfVariant[T]

Create a one-of-variant which uses output if the provided value equals the singleton value. The output shouldn't map to any values, that is, it should be Unit -typed. The entire variant is, on the other hand, typed with the singleton's type T.

Create a one-of-variant which uses output if the provided value equals the singleton value. The output shouldn't map to any values, that is, it should be Unit -typed. The entire variant is, on the other hand, typed with the singleton's type T.

Adds a fixed status-code output with the given value.

Should be used in oneOf output descriptions.

Attributes

See also

oneOfVariantExactMatcher which allows specifying more exact-match values, and where output needs to correspond to type T.

Inherited from:
Tapir
def oneOfVariantSingletonMatcher[T](output: EndpointOutput[Unit])(singletonValue: T): OneOfVariant[T]

Create a one-of-variant which uses output if the provided value equals the singleton value. The output shouldn't map to any values, that is, it should be Unit -typed. The entire variant is, on the other hand, typed with the singleton's type T.

Create a one-of-variant which uses output if the provided value equals the singleton value. The output shouldn't map to any values, that is, it should be Unit -typed. The entire variant is, on the other hand, typed with the singleton's type T.

Should be used in oneOf output descriptions.

Attributes

See also

oneOfVariantExactMatcher which allows specifying more exact-match values, and where output needs to correspond to type T.

Inherited from:
Tapir
def oneOfVariantValueMatcher[T](code: StatusCode, output: EndpointOutput[T])(matcher: PartialFunction[Any, Boolean]): OneOfVariant[T]

Create a one-of-variant which uses output if the provided value (when interpreting as a server matches the matcher predicate). Adds a fixed status-code output with the given value.

Create a one-of-variant which uses output if the provided value (when interpreting as a server matches the matcher predicate). Adds a fixed status-code output with the given value.

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def oneOfVariantValueMatcher[T](output: EndpointOutput[T])(matcher: PartialFunction[Any, Boolean]): OneOfVariant[T]

Create a one-of-variant which uses output if the provided value (when interpreting as a server matches the matcher predicate).

Create a one-of-variant which uses output if the provided value (when interpreting as a server matches the matcher predicate).

Should be used in oneOf output descriptions.

Attributes

Inherited from:
Tapir
def path[T : ([T] =>> Codec[String, T, TextPlain])](name: String): PathCapture[T]

Attributes

Inherited from:
Tapir
def path[T : ([T] =>> Codec[String, T, TextPlain])]: PathCapture[T]

Attributes

Inherited from:
Tapir
def paths: PathsCapture[List[String]]

Attributes

Inherited from:
Tapir
def plainBody[T : ([T] =>> Codec[String, T, TextPlain])](charset: Charset): Body[String, T]

Attributes

Inherited from:
Tapir
def plainBody[T : ([T] =>> Codec[String, T, TextPlain])]: Body[String, T]

Attributes

Inherited from:
Tapir
def query[T : ([T] =>> Codec[List[String], T, TextPlain])](name: String): Query[T]

Attributes

Inherited from:
Tapir
def queryAnyFormat[T, CF <: CodecFormat](name: String, codec: Codec[List[String], T, CF]): Query[T]

A query parameter in any format, read using the given codec.

A query parameter in any format, read using the given codec.

Attributes

Inherited from:
Tapir
def queryParams: QueryParams[QueryParams]

Attributes

Inherited from:
Tapir
def rawBinaryBody[R](rbt: Binary[R])(implicit codec: Codec[R, R, OctetStream]): Body[R, R]

Attributes

Inherited from:
Tapir
def setCookie(name: String): Header[CookieValueWithMeta]

Attributes

Inherited from:
Tapir
def setCookieOpt(name: String): Header[Option[CookieValueWithMeta]]

Attributes

Inherited from:
Tapir
def setCookies: Header[List[CookieWithMeta]]

Attributes

Inherited from:
Tapir
def statusCode(statusCode: StatusCode): FixedStatusCode[Unit]

An fixed status code output.

An fixed status code output.

Attributes

Inherited from:
Tapir
def statusCode: StatusCode[StatusCode]

An output which maps to the status code in the response.

An output which maps to the status code in the response.

Attributes

Inherited from:
Tapir
def streamBinaryBody[S](s: Streams[S])(format: CodecFormat): StreamBodyIO[s.BinaryStream, s.BinaryStream, S]

Creates a stream body with a binary schema.

Creates a stream body with a binary schema.

Value parameters

format

The media type to use by default. Can be later overridden by providing a custom Content-Type header.

s

A supported streams implementation.

Attributes

Inherited from:
Tapir
def streamBody[S, T](s: Streams[S])(schema: Schema[T], format: CodecFormat, charset: Option[Charset] = ...): StreamBodyIO[s.BinaryStream, s.BinaryStream, S]

Creates a stream body with the given schema.

Creates a stream body with the given schema.

Value parameters

charset

An optional charset of the resulting stream's data, to be used in the content type.

format

The media type to use by default. Can be later overridden by providing a custom Content-Type header.

s

A supported streams implementation.

schema

Schema of the body. This should be a schema for the "deserialized" stream.

Attributes

Inherited from:
Tapir
def streamTextBody[S](s: Streams[S])(format: CodecFormat, charset: Option[Charset] = ...): StreamBodyIO[s.BinaryStream, s.BinaryStream, S]

Creates a stream body with a text schema.

Creates a stream body with a text schema.

Value parameters

charset

An optional charset of the resulting stream's data, to be used in the content type.

format

The media type to use by default. Can be later overridden by providing a custom Content-Type header.

s

A supported streams implementation.

Attributes

Inherited from:
Tapir
def stringBody(charset: Charset): Body[String, String]

Attributes

Inherited from:
Tapir
def stringBody(charset: String): Body[String, String]

Attributes

Inherited from:
Tapir
def stringBody: Body[String, String]

Attributes

Inherited from:
Tapir
def stringBodyAnyFormat[T, CF <: CodecFormat](codec: Codec[String, T, CF], charset: Charset): Body[String, T]

A body in any format, read using the given codec, from a raw string read using charset.

A body in any format, read using the given codec, from a raw string read using charset.

Attributes

Inherited from:
Tapir
def stringBodyUtf8AnyFormat[T, CF <: CodecFormat](codec: Codec[String, T, CF]): Body[String, T]

A body in any format, read using the given codec, from a raw string read using UTF-8.

A body in any format, read using the given codec, from a raw string read using UTF-8.

Attributes

Inherited from:
Tapir
def stringJsonBody(charset: Charset): Body[String, String]

A body in the JSON format, read from a raw string using charset.

A body in the JSON format, read from a raw string using charset.

Attributes

Inherited from:
Tapir
def stringJsonBody: Body[String, String]

A body in the JSON format, read from a raw string using UTF-8.

A body in the JSON format, read from a raw string using UTF-8.

Attributes

Inherited from:
Tapir
def sttpClientOptions: SttpClientOptions

Attributes

Inherited from:
SttpClientInterpreter
def toClient[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): I => F[DecodeResult[Either[E, O]]]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result of decoding the response (error or success value) is returned.

Attributes

Inherited from:
SttpClientInterpreter
def toClientThrowDecodeFailures[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): I => F[Either[E, O]]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (error or success value) is returned. If decoding the result fails, a failed effect is returned instead.

Attributes

Inherited from:
SttpClientInterpreter
def toClientThrowErrors[F[_], I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): I => F[O]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (success value) is returned. If decoding the result fails, or if the response corresponds to an error value, a failed effect is returned instead.

Attributes

Inherited from:
SttpClientInterpreter
def toQuickClient[I, E, O](e: PublicEndpoint[I, E, O, Any], baseUri: Option[Uri]): I => Future[Either[E, O]]

Interprets the public endpoint as a synchronous client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a synchronous client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using an asynchronous backend, and the result of decoding the response (error or success value) is returned. If decoding the result fails, a failed future is returned.

Attributes

Inherited from:
SttpClientInterpreterExtensions
def toQuickClientThrowErrors[I, E, O](e: PublicEndpoint[I, E, O, Any], baseUri: Option[Uri]): I => Future[O]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using an asynchronous backend, and the result (success value) is returned. If decoding the result fails, or if the response corresponds to an error value, a failed future is returned.

Attributes

Inherited from:
SttpClientInterpreterExtensions
def toQuickSecureClient[A, I, E, O](e: Endpoint[A, I, E, O, Any], baseUri: Option[Uri]): A => I => Future[Either[E, O]]

Interprets the secure endpoint as a synchronous client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a synchronous client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using an asynchronous backend, and the result of decoding the response (error or success value) is returned. If decoding the result fails, a failed future is returned.

Attributes

Inherited from:
SttpClientInterpreterExtensions
def toQuickSecureClientThrowErrors[A, I, E, O](e: Endpoint[A, I, E, O, Any], baseUri: Option[Uri]): A => I => Future[O]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using an asynchronous backend, and the result (success value) is returned. If decoding the result fails, or if the response corresponds to an error value, a failed future is returned.

Attributes

Inherited from:
SttpClientInterpreterExtensions
def toRequest[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): I => Request[DecodeResult[Either[E, O]], R]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded error or success values (note that this can be the body enriched with data from headers/status code).

Attributes

Inherited from:
SttpClientInterpreter
def toRequestThrowDecodeFailures[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): I => Request[Either[E, O], R]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded error or success values (note that this can be the body enriched with data from headers/status code), or will be a failed effect, when response parsing fails.

Attributes

Inherited from:
SttpClientInterpreter
def toRequestThrowErrors[I, E, O, R](e: PublicEndpoint[I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): I => Request[O, R]

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the public endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's input parameters (given as a tuple), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded success values (note that this can be the body enriched with data from headers/status code), or will be a failed effect, when response parsing fails or if the result is an error.

Attributes

Throws
IllegalArgumentException

when response parsing fails

Inherited from:
SttpClientInterpreter
def toSecureClient[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): A => I => F[DecodeResult[Either[E, O]]]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result of decoding the response (error or success value) is returned.

Attributes

Inherited from:
SttpClientInterpreter
def toSecureClientThrowDecodeFailures[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): A => I => F[Either[E, O]]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (error or success value) is returned. If decoding the result fails, a failed effect is returned instead.

Attributes

Inherited from:
SttpClientInterpreter
def toSecureClientThrowErrors[F[_], A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri], backend: SttpBackend[F, R])(implicit wsToPipe: WebSocketToPipe[R]): A => I => F[O]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The request is sent using the given backend, and the result (success value) is returned. If decoding the result fails, or if the response corresponds to an error value, a failed effect is returned instead.

Attributes

Inherited from:
SttpClientInterpreter
def toSecureRequest[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): A => I => Request[DecodeResult[Either[E, O]], R]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded error or success values (note that this can be the body enriched with data from headers/status code).

Attributes

Inherited from:
SttpClientInterpreter
def toSecureRequestThrowDecodeFailures[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): A => I => Request[Either[E, O], R]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded error or success values (note that this can be the body enriched with data from headers/status code), or will be a failed effect, when response parsing fails.

Attributes

Inherited from:
SttpClientInterpreter
def toSecureRequestThrowErrors[A, I, E, O, R](e: Endpoint[A, I, E, O, R], baseUri: Option[Uri])(implicit wsToPipe: WebSocketToPipe[R]): A => I => Request[O, R]

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Interprets the secure endpoint as a client call, using the given baseUri as the starting point to create the target uri. If baseUri is not provided, the request will be a relative one.

Returns a function which, when applied to the endpoint's security and regular input parameters (given as tuples), will encode them to appropriate request parameters: path, query, headers and body. The result of the function is a description of a request, which can be sent using any sttp backend. The response will then contain the decoded success values (note that this can be the body enriched with data from headers/status code), or will be a failed effect, when response parsing fails or if the result is an error.

Attributes

Throws
IllegalArgumentException

when response parsing fails

Inherited from:
SttpClientInterpreter
def webSocketBody[REQ, REQ_CF <: CodecFormat, RESP, RESP_CF <: CodecFormat]: WebSocketBodyBuilder[REQ, REQ_CF, RESP, RESP_CF]

Type parameters

REQ

The type of messages that are sent to the server.

REQ_CF

The codec format (media type) of messages that are sent to the server.

RESP

The type of messages that are received from the server.

RESP_CF

The codec format (media type) of messages that are received from the server.

Attributes

Inherited from:
Tapir
def webSocketBodyRaw[S](s: Streams[S]): WebSocketBodyOutput[s.Pipe[WebSocketFrame, WebSocketFrame], WebSocketFrame, WebSocketFrame, s.Pipe[WebSocketFrame, WebSocketFrame], S]

Attributes

Inherited from:
Tapir
def xmlBody[T : XmlCodec]: Body[String, T]

Requires an implicit Codec.XmlCodec in scope. Such a codec can be created using Codec.xml.

Requires an implicit Codec.XmlCodec in scope. Such a codec can be created using Codec.xml.

Attributes

Inherited from:
Tapir

Inherited fields

val Codec: Codec.type

Attributes

Inherited from:
TapirAliases
val DecodeResult: DecodeResult.type

Attributes

Inherited from:
TapirAliases
val Defaults: Defaults.type

Defaults.scala

Defaults.scala

Attributes

Inherited from:
TapirAliases
val Endpoint: Endpoint.type

Attributes

Inherited from:
TapirAliases
val EndpointIO: EndpointIO.type

Attributes

Inherited from:
TapirAliases
val EndpointInfo: EndpointInfo.type

Attributes

Inherited from:
TapirAliases
val EndpointInput: EndpointInput.type

Attributes

Inherited from:
TapirAliases
val EndpointOutput: EndpointOutput.type

Attributes

Inherited from:
TapirAliases
val Schema: Schema.type

Attributes

Inherited from:
TapirAliases
val SchemaType: SchemaType.type

Attributes

Inherited from:
TapirAliases
val TapirAuth: TapirAuth.type

TapirAuth.scala

TapirAuth.scala

Attributes

Inherited from:
TapirAliases

Attributes

Inherited from:
CustomTapirPlatformSpecific
val emptyAuth: Auth[Unit, ApiKey]

An empty authentication input, to express the fact (for documentation) that authentication is optional, even in the presence of multiple optional authentication inputs (which by default are treated as alternatives).

An empty authentication input, to express the fact (for documentation) that authentication is optional, even in the presence of multiple optional authentication inputs (which by default are treated as alternatives).

Attributes

Inherited from:
Tapir
val emptyInput: EndpointInput[Unit]

Attributes

Inherited from:
Tapir
val emptyOutput: Atom[Unit]

Attributes

Inherited from:
Tapir
val endpoint: PublicEndpoint[Unit, Unit, Unit, Any]

Attributes

Inherited from:
Tapir
val htmlBodyUtf8: Body[String, String]

Attributes

Inherited from:
Tapir
val infallibleEndpoint: PublicEndpoint[Unit, Nothing, Unit, Any]

Attributes

Inherited from:
Tapir
val multipartBody: Body[Seq[RawPart], Seq[Part[Array[Byte]]]]

Attributes

Inherited from:
Tapir
val noTrailingSlash: EndpointInput[Unit]

An input which matches if the request URI ends with a trailing slash, otherwise the result is a decode failure on the path. Has no effect when used by documentation or client interpreters.

An input which matches if the request URI ends with a trailing slash, otherwise the result is a decode failure on the path. Has no effect when used by documentation or client interpreters.

The input has the NoTrailingSlash.Attribute attribute set to true, which might be useful for server interpreters.

Attributes

Inherited from:
TapirComputedInputs

Deprecated and Inherited fields

val StreamBody: StreamBodyIO.type

Attributes

Deprecated
Use StreamBodyIO instead
Inherited from:
TapirAliases

Implicits

Inherited implicits

final implicit def ModifyEach[F[_], T](t: F[T])(implicit f: ModifyFunctor[F, T]): ModifyEach[F, T]

Attributes

Inherited from:
ModifyMacroFunctorSupport
final implicit def ModifyEachMap[F[_, _], K, T](t: F[K, T])(implicit fac: Factory[(K, T), F[K, T]]): ModifyEachMap[F, K, T]

Attributes

Inherited from:
ModifyMacroSupport
implicit def optionModifyFunctor[A]: ModifyFunctor[Option, A]

Attributes

Inherited from:
ModifyMacroFunctorSupport
implicit val schemaForZioJsonObject: Schema[Obj]

Attributes

Inherited from:
TapirJsonZio
implicit val schemaForZioJsonValue: Schema[Json]

Attributes

Inherited from:
TapirJsonZio
implicit def stringToPath(s: String): FixedPath[Unit]

Attributes

Inherited from:
Tapir
implicit def traversableModifyFunctor[F[_], A](implicit fac: Factory[A, F[A]], ev: (F[A]) => Iterable[A]): ModifyFunctor[F, A]

Attributes

Inherited from:
ModifyMacroSupport
implicit def zioCodec[T : Schema]: JsonCodec[T]

Attributes

Inherited from:
TapirJsonZio