p

tapir

package tapir

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. tapir
  2. Tapir
  3. TapirDerivedInputs
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type AnyCodec = Codec[_, _ <: MediaType, _]
  2. type AnyCodecForMany = CodecForMany[_, _ <: MediaType, _]
  3. type AnyCodecMeta = CodecMeta[_, _ <: MediaType, _]
  4. type AnyPart = Part[_]
  5. trait Codec[T, M <: MediaType, R] extends Decode[T, R]

    A pair of functions, one to encode a value of type T to a raw value of type R, and another one to decode.

    A pair of functions, one to encode a value of type T to a raw value of type R, 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( ... )
  6. trait CodecForMany[T, M <: MediaType, R] extends Decode[T, Seq[R]]

    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 can be mapped to a multiple values.

    The main difference comparing to Codec is the signature of the encode and rawDecode methods. For each Codec, a CodecForMany can be derived.

    Annotations
    @implicitNotFound( ... )
  7. trait CodecForOptional[T, M <: MediaType, R] extends Decode[T, Option[R]]

    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 can be mapped to an optional value.

    The main difference comparing to Codec is the signature of the encode and rawDecode methods. For each Codec, a CodecForOptional can be derived.

    Annotations
    @implicitNotFound( ... )
  8. case class CodecMeta[T, M <: MediaType, R] extends Product with Serializable

    Contains meta-data for a Codec, between type T and a raw value R.

    Contains meta-data for a Codec, between type T and a raw value R.

    The meta-data consists of the schema for type T, validator, optionality and reified type of the raw value.

  9. trait Decode[T, F] extends AnyRef
  10. sealed trait DecodeFailure extends DecodeResult[Nothing]
  11. sealed trait DecodeResult[+T] extends AnyRef
  12. 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.

  13. sealed trait EndpointIO[I] extends EndpointInput[I] with EndpointOutput[I]
  14. case class EndpointInfo(name: Option[String], summary: Option[String], description: Option[String], tags: Vector[String]) extends Product with Serializable
  15. sealed trait EndpointInput[I] extends AnyRef
  16. sealed trait EndpointOutput[I] extends AnyRef
  17. trait MediaType extends AnyRef
  18. case class MultipartValueType(partCodecMetas: Map[String, AnyCodecMeta], defaultCodecMeta: Option[AnyCodecMeta]) extends RawValueType[Seq[RawPart]] with Product with Serializable
  19. type RawPart = Part[_]
  20. sealed trait RawValueType[R] extends AnyRef
  21. sealed trait Schema extends AnyRef
  22. trait SchemaFor[T] extends AnyRef
  23. sealed trait StreamingEndpointIO[I, +S] extends AnyRef
  24. case class StringValueType(charset: Charset) extends RawValueType[String] with Product with Serializable
  25. trait Tapir extends TapirDerivedInputs
  26. trait TapirAliases extends AnyRef

    Mixin containing aliases for top-level types and modules in the tapir package.

  27. trait TapirDerivedInputs extends AnyRef
  28. case class ValidationError[T](validator: Primitive[T], invalidValue: T) extends Product with Serializable
  29. sealed trait Validator[T] extends AnyRef

Value Members

  1. def auth: TapirAuth.type
    Definition Classes
    Tapir
  2. def binaryBody[T](implicit codec: CodecForOptional[T, OctetStream, _]): Body[T, OctetStream, _]
    Definition Classes
    Tapir
  3. def body[T, M <: MediaType](implicit tm: CodecForOptional[T, M, _]): Body[T, M, _]
    Definition Classes
    Tapir
  4. def clientIp: EndpointInput[Option[String]]
    Definition Classes
    TapirDerivedInputs
  5. def cookie[T](name: String)(implicit arg0: PlainCodecForOptional[T]): Cookie[T]
    Definition Classes
    Tapir
  6. def cookies: Header[List[Cookie]]
    Definition Classes
    Tapir
  7. def emptyOutput: EndpointOutput[Unit]

    An empty output.

    An empty output. Useful if one of oneOf branches should be mapped to the status code only.

    Definition Classes
    Tapir
  8. val endpoint: Endpoint[Unit, Unit, Unit, Nothing]
    Definition Classes
    Tapir
  9. 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
  10. def formBody[T](implicit codec: CodecForOptional[T, XWwwFormUrlencoded, _]): Body[T, XWwwFormUrlencoded, _]
    Definition Classes
    Tapir
  11. def header(name: String, value: String): FixedHeader
    Definition Classes
    Tapir
  12. def header[T](name: String)(implicit arg0: PlainCodecForMany[T]): Header[T]
    Definition Classes
    Tapir
  13. def headers: Headers
    Definition Classes
    Tapir
  14. val htmlBodyUtf8: Body[String, TextHtml, String]
    Definition Classes
    Tapir
  15. val infallibleEndpoint: Endpoint[Unit, Nothing, Unit, Nothing]
    Definition Classes
    Tapir
  16. def jsonBody[T](implicit codec: CodecForOptional[T, Json, _]): Body[T, Json, _]
    Definition Classes
    Tapir
  17. def multipartBody[T](implicit codec: CodecForOptional[T, MultipartFormData, _]): Body[T, MultipartFormData, _]
    Definition Classes
    Tapir
  18. def oneOf[I](firstCase: StatusMapping[_ <: I], otherCases: StatusMapping[_ <: I]*): OneOf[I]

    Maps status codes to outputs.

    Maps status codes to outputs. All outputs must have a common supertype (I). Typically, the supertype is a sealed trait, and the mappings are implementing cases classes.

    Note that exhaustiveness of the mappings is not checked (that all subtypes of I are covered).

    Definition Classes
    Tapir
  19. def path[T](name: String)(implicit arg0: PlainCodec[T]): PathCapture[T]
    Definition Classes
    Tapir
  20. def path[T](implicit arg0: PlainCodec[T]): PathCapture[T]
    Definition Classes
    Tapir
  21. def paths: PathsCapture
    Definition Classes
    Tapir
  22. def plainBody[T](implicit codec: CodecForOptional[T, TextPlain, _]): Body[T, TextPlain, _]
    Definition Classes
    Tapir
  23. def query[T](name: String)(implicit arg0: PlainCodecForMany[T]): Query[T]
    Definition Classes
    Tapir
  24. def queryParams: QueryParams
    Definition Classes
    Tapir
  25. def schemaFor[T](implicit arg0: SchemaFor[T]): Schema
    Definition Classes
    Tapir
  26. def setCookie(name: String): Header[SetCookieValue]
    Definition Classes
    Tapir
  27. def setCookies: Header[List[SetCookie]]
    Definition Classes
    Tapir
  28. def statusCode(statusCode: StatusCode): FixedStatusCode
    Definition Classes
    Tapir
  29. def statusCode: StatusCode
    Definition Classes
    Tapir
  30. def statusDefaultMapping[O](output: EndpointOutput[O])(implicit arg0: ClassTag[O]): StatusMapping[O]

    Create a fallback mapping to be used in oneOf output descriptions.

    Create a fallback mapping to be used in oneOf output descriptions.

    Definition Classes
    Tapir
  31. def statusMapping[O](statusCode: StatusCode, output: EndpointOutput[O])(implicit arg0: ClassTag[O]): StatusMapping[O]

    Create a mapping to be used in oneOf output descriptions.

    Create a mapping to be used in oneOf output descriptions.

    Definition Classes
    Tapir
  32. def streamBody[S](schema: Schema, mediaType: MediaType): Body[S, mediaType.type]
    Definition Classes
    Tapir
  33. def stringBody(charset: Charset): Body[String, TextPlain, String]
    Definition Classes
    Tapir
  34. def stringBody(charset: String): Body[String, TextPlain, String]
    Definition Classes
    Tapir
  35. def stringBody: Body[String, TextPlain, String]
    Definition Classes
    Tapir
  36. implicit def stringToPath(s: String): EndpointInput[Unit]
    Definition Classes
    Tapir
  37. object ByteArrayValueType extends RawValueType[Array[Byte]] with Product with Serializable
  38. object ByteBufferValueType extends RawValueType[ByteBuffer] with Product with Serializable
  39. object Codec extends MultipartCodecDerivation with FormCodecDerivation
  40. object CodecForMany
  41. object CodecForOptional
  42. object CodecMeta extends Serializable
  43. object DecodeResult
  44. object Defaults
  45. object EndpointIO
  46. object EndpointInput
  47. object EndpointOutput
  48. object FileValueType extends RawValueType[File] with Product with Serializable
  49. object InputStreamValueType extends RawValueType[InputStream] with Product with Serializable
  50. object MediaType
  51. object RenderPathTemplate
  52. object Schema
  53. object SchemaFor extends SchemaForMagnoliaDerivation
  54. object StreamingEndpointIO
  55. object TapirAuth
  56. object Validator extends ValidatorMagnoliaDerivation with ValidatorEnumMacro

Inherited from Tapir

Inherited from TapirDerivedInputs

Inherited from AnyRef

Inherited from Any

Ungrouped