tapir
package tapir
- Alphabetic
- By Inheritance
- tapir
- Tapir
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
Codec[T, M <: MediaType, R] extends GeneralCodec[T, M, R]
A pair of functions, one to encode a non-optional value of type
T
to a raw value of typeR
, and another one to decode.A pair of functions, one to encode a non-optional 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.
- case class CodecMeta[M <: MediaType] extends Product with Serializable
- sealed trait DecodeResult[+T] extends AnyRef
-
case class
Endpoint[I, E, O, +S](method: Method, input: EndpointInput[I], errorOutput: EndpointIO[E], output: EndpointIO[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]
- 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
-
trait
GeneralCodec[T, M <: MediaType, R] extends AnyRef
A codec which can encode/decode both optional and non-optional values of type
T
to raw values of typeR
.A codec which can encode/decode both optional and non-optional values of type
T
to raw values of typeR
. Base trait for all codecs. - trait MediaType extends AnyRef
- final case class Method(m: String) extends AnyVal with Product with Serializable
- class MultiQueryParams extends AnyRef
- sealed trait RawValueType[R] extends AnyRef
- sealed trait Schema extends AnyRef
- trait SchemaFor[T] extends AnyRef
- type StatusCode = Int
- trait StatusCodes extends AnyRef
- sealed trait StreamingEndpointIO[I, +S] extends AnyRef
- case class StringValueType(charset: Charset) extends RawValueType[String] with Product with Serializable
- trait Tapir extends AnyRef
-
case class
InvalidOutput(reason: DecodeResult[Nothing], cause: Option[Throwable]) extends Exception with Product with Serializable
- Definition Classes
- Tapir
Value Members
-
def
binaryBody[T](implicit codec: GeneralCodec[T, OctetStream, _]): Body[T, OctetStream, _]
- Definition Classes
- Tapir
-
def
body[T, M <: MediaType](implicit tm: GeneralCodec[T, M, _]): Body[T, M, _]
- Definition Classes
- Tapir
-
val
endpoint: Endpoint[Unit, Unit, Unit, Nothing]
- Definition Classes
- Tapir
-
def
formBody[T](implicit codec: GeneralCodec[T, XWwwFormUrlencoded, _]): Body[T, XWwwFormUrlencoded, _]
- Definition Classes
- Tapir
-
def
header[T](name: String)(implicit arg0: GeneralPlainCodec[T]): Header[T]
- Definition Classes
- Tapir
-
def
headers: Headers
- Definition Classes
- Tapir
-
def
jsonBody[T](implicit codec: GeneralCodec[T, Json, _]): Body[T, Json, _]
- 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: GeneralCodec[T, TextPlain, _]): Body[T, TextPlain, _]
- Definition Classes
- Tapir
-
def
query[T](name: String)(implicit arg0: GeneralPlainCodec[T]): Query[T]
- Definition Classes
- Tapir
-
def
queryParams: QueryParams
- Definition Classes
- Tapir
-
def
schemaFor[T](implicit arg0: SchemaFor[T]): Schema
- 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
- object ByteArrayValueType extends RawValueType[Array[Byte]] with Product with Serializable
- object ByteBufferValueType extends RawValueType[ByteBuffer] with Product with Serializable
- object CodecMeta extends Serializable
- object DecodeResult
- object Defaults
- object EndpointIO
- object EndpointInput
- object FileValueType extends RawValueType[File] with Product with Serializable
- object GeneralCodec extends FormCodecDerivation
- object InputStreamValueType extends RawValueType[InputStream] with Product with Serializable
- object MediaType
- object Method extends Serializable
- object MultiQueryParams
- object Schema
- object SchemaFor extends SchemaForMagnoliaDerivation
- object StatusCodes extends StatusCodes
- object StreamingEndpointIO