p

sttp

tapir

package tapir

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. tapir
  2. Tapir
  3. ModifyMacroSupport
  4. ModifyMacroFunctorSupport
  5. TapirDerivedInputs
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

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

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

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

    Also contains meta-data on the schema of the value, the codec format and the raw value type.

    T

    Type of the values which can be encoded / to which raw values can be decoded.

    CF

    The format of encoded values. Corresponds to a media type.

    R

    Type of the raw value to which values are encoded.

    Annotations
    @implicitNotFound( ... )
  6. trait CodecForMany[T, CF <: CodecFormat, 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, CF <: CodecFormat, 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. trait CodecFormat extends AnyRef

    Specifies the format of the encoded values.

    Specifies the format of the encoded values. Each variant must be a proper type so that it can be used as a discriminator for different (implicit) instances of Codec values.

  9. case class CodecMeta[T, CF <: CodecFormat, 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 and reified type of the raw value.

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

  14. sealed trait EndpointIO[I] extends EndpointInput[I] with EndpointOutput[I]
  15. case class EndpointInfo(name: Option[String], summary: Option[String], description: Option[String], tags: Vector[String], deprecated: Boolean) extends Product with Serializable
  16. sealed trait EndpointInput[I] extends AnyRef
  17. sealed trait EndpointOutput[I] extends AnyRef
  18. trait LowPrioritySchema extends AnyRef
  19. case class MultipartValueType(partCodecMetas: Map[String, AnyCodecMeta], defaultCodecMeta: Option[AnyCodecMeta]) extends RawValueType[Seq[RawPart]] with Product with Serializable
  20. type RawPart = Part[_]
  21. sealed trait RawValueType[R] extends AnyRef
  22. case class Schema[T](schemaType: SchemaType, isOptional: Boolean = false, description: Option[String] = None, format: Option[String] = None, deprecated: Boolean = false) extends Product with Serializable

    Describes the shape of the low-level, "raw" representation of type T.

    Describes the shape of the low-level, "raw" representation of type T.

    format

    The name of the format of the low-level representation of T.

  23. sealed trait SchemaType extends AnyRef
  24. sealed trait StreamingEndpointIO[I, +S] extends AnyRef
  25. case class StringValueType(charset: Charset) extends RawValueType[String] with Product with Serializable
  26. trait Tapir extends TapirDerivedInputs with ModifyMacroSupport
  27. trait TapirAliases extends AnyRef

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

  28. trait TapirDerivedInputs extends AnyRef
  29. case class ValidationError[T](validator: Primitive[T], invalidValue: T, path: List[FieldName] = Nil) extends Product with Serializable
  30. sealed trait Validator[T] extends AnyRef
  31. implicit class ModifyEach[F[_], T] extends AnyRef
    Definition Classes
    ModifyMacroFunctorSupport
  32. trait ModifyFunctor[F[_], A] extends AnyRef
    Definition Classes
    ModifyMacroFunctorSupport
  33. implicit class ModifyEachMap[F[_, _], K, T] extends AnyRef
    Definition Classes
    ModifyMacroSupport
  34. trait ModifyMapAtFunctor[F[_, _], K, T] extends AnyRef
    Definition Classes
    ModifyMacroSupport

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, CF <: CodecFormat](implicit tm: CodecForOptional[T, CF, _]): Body[T, CF, _]
    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(h: Header): FixedHeader
    Definition Classes
    Tapir
  13. def header[T](name: String)(implicit arg0: PlainCodecForMany[T]): Header[T]
    Definition Classes
    Tapir
  14. def headers: Headers
    Definition Classes
    Tapir
  15. val htmlBodyUtf8: Body[String, TextHtml, String]
    Definition Classes
    Tapir
  16. val infallibleEndpoint: Endpoint[Unit, Nothing, Unit, Nothing]
    Definition Classes
    Tapir
  17. def jsonBody[T](implicit codec: CodecForOptional[T, Json, _]): Body[T, Json, _]
    Definition Classes
    Tapir
  18. implicit def mapModifyFunctor[M[KT, TT] <: Map[KT, TT], K, T](implicit cbf: CanBuildFrom[M[K, T], (K, T), M[K, T]]): ModifyMapAtFunctor[M, K, T]
    Definition Classes
    ModifyMacroSupport
  19. def multipartBody[T](implicit codec: CodecForOptional[T, MultipartFormData, _]): Body[T, MultipartFormData, _]
    Definition Classes
    Tapir
  20. 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
  21. implicit def optionModifyFunctor[A]: ModifyFunctor[Option, A]
    Definition Classes
    ModifyMacroFunctorSupport
  22. def path[T](name: String)(implicit arg0: PlainCodec[T]): PathCapture[T]
    Definition Classes
    Tapir
  23. def path[T](implicit arg0: PlainCodec[T]): PathCapture[T]
    Definition Classes
    Tapir
  24. def paths: PathsCapture
    Definition Classes
    Tapir
  25. def plainBody[T](implicit codec: CodecForOptional[T, TextPlain, _]): Body[T, TextPlain, _]
    Definition Classes
    Tapir
  26. def query[T](name: String)(implicit arg0: PlainCodecForMany[T]): Query[T]
    Definition Classes
    Tapir
  27. def queryParams: QueryParams
    Definition Classes
    Tapir
  28. def schemaFor[T](implicit arg0: Schema[T]): Schema[T]
    Definition Classes
    Tapir
  29. def setCookie(name: String): Header[CookieValueWithMeta]
    Definition Classes
    Tapir
  30. def setCookies: Header[List[CookieWithMeta]]
    Definition Classes
    Tapir
  31. def statusCode(statusCode: StatusCode): FixedStatusCode
    Definition Classes
    Tapir
  32. def statusCode: StatusCode
    Definition Classes
    Tapir
  33. def statusDefaultMapping[O](output: EndpointOutput[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
  34. macro def statusMapping[O](statusCode: StatusCode, output: EndpointOutput[O])(implicit arg0: ClassTag[O]): StatusMapping[O]

    Create a status mapping which uses statusCode and output if the class of the provided value (when interpreting as a server) matches the runtime class of O.

    Create a status mapping which uses statusCode and output if the class of the provided value (when interpreting as a server) matches the runtime class of O.

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

    Should be used in oneOf output descriptions.

    Definition Classes
    Tapir
  35. def statusMappingClassMatcher[O](statusCode: StatusCode, output: EndpointOutput[O], runtimeClass: Class[_]): StatusMapping[O]

    Create a status mapping which uses statusCode and output if the class of the provided value (when interpreting as a server) matches the given runtimeClass.

    Create a status mapping which uses statusCode and 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.

    Definition Classes
    Tapir
  36. def statusMappingFromMatchType[O](statusCode: StatusCode, output: EndpointOutput[O])(implicit arg0: MatchType[O]): StatusMapping[O]

    Experimental!

    Experimental!

    Create a status mapping which uses statusCode and 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.

    Definition Classes
    Tapir
  37. def statusMappingValueMatcher[O](statusCode: StatusCode, output: EndpointOutput[O])(matcher: PartialFunction[Any, Boolean]): StatusMapping[O]

    Create a status mapping which uses statusCode and output if the provided value (when interpreting as a server matches the matcher predicate.

    Create a status mapping which uses statusCode and output if the provided value (when interpreting as a server matches the matcher predicate.

    Should be used in oneOf output descriptions.

    Definition Classes
    Tapir
  38. def streamBody[S](schema: Schema[_], format: CodecFormat): Body[S, format.type]

    schema

    Schema of the body. Note that any schema can be passed here, usually this will be a schema for the "deserialized" stream.

    format

    The format of the stream body, which specifies its media type.

    Definition Classes
    Tapir
  39. def stringBody(charset: Charset): Body[String, TextPlain, String]
    Definition Classes
    Tapir
  40. def stringBody(charset: String): Body[String, TextPlain, String]
    Definition Classes
    Tapir
  41. def stringBody: Body[String, TextPlain, String]
    Definition Classes
    Tapir
  42. implicit def stringToPath(s: String): EndpointInput[Unit]
    Definition Classes
    Tapir
  43. implicit def traversableModifyFunctor[F[_], A](implicit cbf: CanBuildFrom[F[A], A, F[A]], ev: (F[A]) ⇒ TraversableLike[A, F[A]]): ModifyFunctor[F, A]
    Definition Classes
    ModifyMacroSupport
  44. object ByteArrayValueType extends RawValueType[Array[Byte]] with Product with Serializable
  45. object ByteBufferValueType extends RawValueType[ByteBuffer] with Product with Serializable
  46. object Codec extends MultipartCodecDerivation with FormCodecDerivation
  47. object CodecForMany
  48. object CodecForOptional
  49. object CodecFormat
  50. object CodecMeta extends Serializable
  51. object DecodeResult
  52. object Defaults
  53. object EndpointIO
  54. object EndpointInput
  55. object EndpointOutput
  56. object FileValueType extends RawValueType[File] with Product with Serializable
  57. object InputStreamValueType extends RawValueType[InputStream] with Product with Serializable
  58. object RenderPathTemplate
  59. object Schema extends SchemaMagnoliaDerivation with LowPrioritySchema with Serializable
  60. object SchemaType
  61. object StreamingEndpointIO
  62. object TapirAuth
  63. object Validator extends ValidatorMagnoliaDerivation with ValidatorEnumMacro

Inherited from Tapir

Inherited from ModifyMacroSupport

Inherited from ModifyMacroFunctorSupport

Inherited from TapirDerivedInputs

Inherited from AnyRef

Inherited from Any

Ungrouped