tapir
package tapir
- Alphabetic
- By Inheritance
- tapir
- Tapir
- TapirDerivedInputs
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type AnyCodec = Codec[_, _ <: MediaType, _]
- type AnyCodecForMany = CodecForMany[_, _ <: MediaType, _]
- type AnyCodecMeta = CodecMeta[_ <: MediaType, _]
- type AnyPart = Part[_]
-
trait
Codec[T, M <: MediaType, R] extends Decode[R, T]
A pair of functions, one to encode a value of type
T
to a raw value of typeR
, and another one to decode.A pair of functions, one to encode a value of type
T
to a raw value of typeR
, and another one to decode.Also contains meta-data on the
schema
of the value, the media type and the raw value type.- T
Type of the values which can be encoded / to which raw values can be decoded.
- M
The media type of encoded values.
- R
Type of the raw value to which values are encoded.
- Annotations
- @implicitNotFound( ... )
-
trait
CodecForMany[T, M <: MediaType, R] extends Decode[Seq[R], T]
A codec which can encode to multiple (0..n) raw values / decode from multiple raw values.
A codec which can encode to multiple (0..n) raw values / decode from multiple raw values. An multiple raw value specifies that the raw values should be included in the output multiple times. Depending on the codec, decoding from a multiple value might yield DecodeResult.Missing or DecodeResult.Multiple.
Should be used for inputs/outputs which allow multiple values.
- Annotations
- @implicitNotFound( ... )
-
trait
CodecForOptional[T, M <: MediaType, R] extends Decode[Option[R], T]
A codec which can encode to optional raw values / decode from optional raw values.
A codec which can encode to optional raw values / decode from optional raw values. An optional raw value specifies if the raw value should be included in the output, or not. Depending on the codec, decoding from an optional value might yield DecodeResult.Missing.
Should be used for inputs/outputs which allow optional values.
- Annotations
- @implicitNotFound( ... )
- case class CodecMeta[M <: MediaType, R] extends Product with Serializable
- trait Decode[F, T] extends AnyRef
- sealed trait DecodeFailure extends DecodeResult[Nothing]
- sealed trait DecodeResult[+T] extends AnyRef
-
case class
Endpoint[I, E, O, +S](input: EndpointInput[I], errorOutput: EndpointOutput[E], output: EndpointOutput[O], info: EndpointInfo) extends Product with Serializable
- I
Input parameter types.
- E
Error output parameter types.
- O
Output parameter types.
- S
The type of streams that are used by this endpoint's inputs/outputs.
Nothing
, if no streams are used.
- sealed trait EndpointIO[I] extends EndpointInput[I] with EndpointOutput[I]
- case class EndpointInfo(name: Option[String], summary: Option[String], description: Option[String], tags: Vector[String]) extends Product with Serializable
- sealed trait EndpointInput[I] extends AnyRef
- sealed trait EndpointOutput[I] extends AnyRef
- trait MediaType extends AnyRef
- case class MultipartValueType(partCodecMetas: Map[String, AnyCodecMeta], defaultCodecMeta: Option[AnyCodecMeta]) extends RawValueType[Seq[RawPart]] with Product with Serializable
- type RawPart = Part[_]
- sealed trait RawValueType[R] extends AnyRef
- sealed trait Schema extends AnyRef
- trait SchemaFor[T] extends AnyRef
- sealed trait StreamingEndpointIO[I, +S] extends AnyRef
- case class StringValueType(charset: Charset) extends RawValueType[String] with Product with Serializable
- trait Tapir extends TapirDerivedInputs
- trait TapirDerivedInputs extends AnyRef
-
trait
When[-I] extends AnyRef
Describe conditions for status code mapping using
Tapir.statusFrom
. - case class WhenClass[T](ct: ClassTag[T], s: Schema) extends When[Any] with Product with Serializable
- case class WhenValue[T](p: (T) ⇒ Boolean) extends When[T] with Product with Serializable
Value Members
-
def
auth: TapirAuth.type
- Definition Classes
- Tapir
-
def
binaryBody[T](implicit codec: CodecForOptional[T, OctetStream, _]): Body[T, OctetStream, _]
- Definition Classes
- Tapir
-
def
body[T, M <: MediaType](implicit tm: CodecForOptional[T, M, _]): Body[T, M, _]
- Definition Classes
- Tapir
-
def
clientIp: EndpointInput[Option[String]]
- Definition Classes
- TapirDerivedInputs
-
def
cookie[T](name: String)(implicit arg0: PlainCodecForOptional[T]): Cookie[T]
- Definition Classes
- Tapir
-
def
cookies: Header[List[Cookie]]
- Definition Classes
- Tapir
-
val
endpoint: Endpoint[Unit, Unit, Unit, Nothing]
- Definition Classes
- Tapir
-
def
extractFromRequest[T](f: (ServerRequest) ⇒ T): ExtractFromRequest[T]
Extract a value from a server request.
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.
- Definition Classes
- Tapir
-
def
formBody[T](implicit codec: CodecForOptional[T, XWwwFormUrlencoded, _]): Body[T, XWwwFormUrlencoded, _]
- Definition Classes
- Tapir
-
def
header[T](name: String)(implicit arg0: PlainCodecForMany[T]): Header[T]
- Definition Classes
- Tapir
-
def
headers: Headers
- Definition Classes
- Tapir
-
def
jsonBody[T](implicit codec: CodecForOptional[T, Json, _]): Body[T, Json, _]
- Definition Classes
- Tapir
-
def
multipartBody[T](implicit codec: CodecForOptional[T, MultipartFormData, _]): Body[T, MultipartFormData, _]
- Definition Classes
- Tapir
-
def
path[T](name: String)(implicit arg0: PlainCodec[T]): PathCapture[T]
- Definition Classes
- Tapir
-
def
path[T](implicit arg0: PlainCodec[T]): PathCapture[T]
- Definition Classes
- Tapir
-
def
paths: PathsCapture
- Definition Classes
- Tapir
-
def
plainBody[T](implicit codec: CodecForOptional[T, TextPlain, _]): Body[T, TextPlain, _]
- Definition Classes
- Tapir
-
def
query[T](name: String)(implicit arg0: PlainCodecForMany[T]): Query[T]
- Definition Classes
- Tapir
-
def
queryParams: QueryParams
- Definition Classes
- Tapir
-
def
schemaFor[T](implicit arg0: SchemaFor[T]): Schema
- Definition Classes
- Tapir
-
def
setCookie(name: String): Header[SetCookieValue]
- Definition Classes
- Tapir
-
def
setCookies: Header[List[SetCookie]]
- Definition Classes
- Tapir
-
def
statusCode: StatusCode
- Definition Classes
- Tapir
-
def
streamBody[S](schema: Schema, mediaType: MediaType): Body[S, mediaType.type]
- Definition Classes
- Tapir
-
def
stringBody(charset: Charset): Body[String, TextPlain, String]
- Definition Classes
- Tapir
-
def
stringBody(charset: String): Body[String, TextPlain, String]
- Definition Classes
- Tapir
-
def
stringBody: Body[String, TextPlain, String]
- Definition Classes
- Tapir
-
implicit
def
stringToPath(s: String): EndpointInput[Unit]
- Definition Classes
- Tapir
-
def
whenClass[U](implicit arg0: ClassTag[U], arg1: SchemaFor[U]): When[Any]
- Definition Classes
- Tapir
-
def
whenValue[U](p: (U) ⇒ Boolean): When[U]
- Definition Classes
- Tapir
- object ByteArrayValueType extends RawValueType[Array[Byte]] with Product with Serializable
- object ByteBufferValueType extends RawValueType[ByteBuffer] with Product with Serializable
- object Codec extends MultipartCodecDerivation with FormCodecDerivation
- object CodecForMany
- object CodecForOptional
- object CodecMeta extends Serializable
- object DecodeResult
- object Defaults
- object EndpointIO
- object EndpointInput
- object EndpointOutput
- object FileValueType extends RawValueType[File] with Product with Serializable
- object InputStreamValueType extends RawValueType[InputStream] with Product with Serializable
- object MediaType
- object Schema
- object SchemaFor extends SchemaForMagnoliaDerivation
- object StreamingEndpointIO
- object TapirAuth
Deprecated Value Members
-
def
statusFrom[I](io: EndpointIO[I], default: StatusCode, when: (When[I], StatusCode)*): StatusFrom[I]
- Definition Classes
- Tapir
- Annotations
- @deprecated
- Deprecated