object Codec extends CodecExtensions with CodecExtensions2 with FormCodecMacros with CodecMacros with LowPriorityCodec

Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Codec
  2. LowPriorityCodec
  3. CodecMacros
  4. FormCodecMacros
  5. CodecExtensions2
  6. CodecExtensions
  7. AnyRef
  8. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type JsonCodec[T] = Codec[String, T, Json]
  2. type PlainCodec[T] = Codec[String, T, TextPlain]
  3. type XmlCodec[T] = Codec[String, T, Xml]

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. def anyString[T, CF <: CodecFormat](cf: CF)(_rawDecode: (String) ⇒ DecodeResult[T])(_encode: (T) ⇒ String)(implicit arg0: Schema[T]): Codec[String, T, CF]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. implicit val bigDecimal: Codec[String, BigDecimal, TextPlain]
  7. implicit val bigInt: Codec[String, BigInt, TextPlain]
  8. implicit def binaryOrCloseWebSocketFrame[A, CF <: CodecFormat](implicit byteArrayCodec: Codec[Array[Byte], A, CF]): Codec[WebSocketFrame, Option[A], CF]

    A codec which expects only binary and close frames (all other frames cause a decoding error).

    A codec which expects only binary and close frames (all other frames cause a decoding error). Close frames correspond to None, while text frames are handled using the given byteArrayCodec and wrapped with Some.

  9. implicit def binaryWebSocketFrame[A, CF <: CodecFormat](implicit byteArrayCodec: Codec[Array[Byte], A, CF]): Codec[WebSocketFrame, A, CF]

    A codec which expects only binary frames (all other frames cause a decoding error) and handles the text using the given byteArrayCodec.

  10. implicit val boolean: Codec[String, Boolean, TextPlain]
  11. implicit val byte: Codec[String, Byte, TextPlain]
  12. implicit val byteArray: Codec[Array[Byte], Array[Byte], OctetStream]
  13. implicit val byteBuffer: Codec[ByteBuffer, ByteBuffer, OctetStream]
  14. implicit val cacheDirective: Codec[String, List[CacheDirective], TextPlain]
  15. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  16. implicit val cookie: Codec[String, List[Cookie], TextPlain]
  17. implicit val cookieWithMeta: Codec[String, CookieWithMeta, TextPlain]
  18. implicit val cookies: Codec[List[String], List[Cookie], TextPlain]
  19. implicit val cookiesWithMeta: Codec[List[String], List[CookieWithMeta], TextPlain]
  20. implicit val date: Codec[String, Date, TextPlain]
  21. macro def derivedEnumeration[L, T]: CreateDerivedEnumerationCodec[L, T]

    Creates a codec for an enumeration, where the validator is derived using sttp.tapir.Validator.derivedEnumeration.

    Creates a codec for an enumeration, where the validator is derived using sttp.tapir.Validator.derivedEnumeration. This requires that all subtypes of the sealed hierarchy T must be objects.

    This method cannot be implicit, as there's no way to constraint the type T to be a sealed trait / class enumeration, so that this would be invoked only when necessary.

    L

    The type of the low-level representation of the enum, typically a String or an Int.

    T

    The type of the enum.

    Definition Classes
    CodecMacros
  22. implicit macro def derivedEnumerationValue[T <: Value]: Codec[String, T, TextPlain]

    A default codec for enumerations, which returns a string-based enumeration codec, using the enum's .toString to encode values, and performing a case-insensitive search through the possible values, converted to strings using .toString.

    A default codec for enumerations, which returns a string-based enumeration codec, using the enum's .toString to encode values, and performing a case-insensitive search through the possible values, converted to strings using .toString.

    To customise the enum encoding/decoding functions, provide a custom implicit created using derivedEnumerationValueCustomise.

    Definition Classes
    CodecMacros
  23. macro def derivedEnumerationValueCustomise[L, T <: Value]: CreateDerivedEnumerationCodec[L, T]

    Creates a codec for an Enumeration, where the validator is created using the enumeration's values.

    Creates a codec for an Enumeration, where the validator is created using the enumeration's values. Unlike the default derivedEnumerationValue method, which provides the schema implicitly, this variant allows customising how the codec is created. This is useful if the low-level representation of the schema is different than a String, or if the enumeration's values should be encoded in a different way than using .toString.

    Because of technical limitations of macros, the customisation arguments can't be given here directly, instead being delegated to CreateDerivedEnumerationSchema.

    L

    The type of the low-level representation of the enum, typically a String or an Int.

    T

    The type of the enum.

    Definition Classes
    CodecMacros
  24. implicit macro def derivedValueClass[T <: AnyVal]: Codec[String, T, TextPlain]

    Creates a codec for value class based on codecs defined in Codec companion

    Creates a codec for value class based on codecs defined in Codec companion

    Definition Classes
    CodecMacros
  25. implicit val double: Codec[String, Double, TextPlain]
  26. implicit val duration: Codec[String, Duration, TextPlain]
  27. def eitherLeft[L, A, B, CF <: CodecFormat](c1: Codec[L, A, CF], c2: Codec[L, B, CF]): Codec[L, Either[A, B], CF]

    Create a codec which during decoding, first tries to decode values on the left using c1.

    Create a codec which during decoding, first tries to decode values on the left using c1. If this fails for any reason, decoding is done using c2. Both codecs must have the same low-level values and formats.

    For a right-biased variant see Codec.eitherRight.

    The schema is defined to be an either schema as created by Schema.schemaForEither.

    Definition Classes
    LowPriorityCodec
  28. implicit def eitherRight[L, A, B, CF <: CodecFormat](implicit c1: Codec[L, A, CF], c2: Codec[L, B, CF]): Codec[L, Either[A, B], CF]

    Create a codec which during decoding, first tries to decode values on the right using c2.

    Create a codec which during decoding, first tries to decode values on the right using c2. If this fails for any reason, decoding is done using c1. Both codecs must have the same low-level values and formats.

    For a left-biased variant see Codec.eitherLeft. This right-biased version is the default when using implicit codec resolution.

    The schema is defined to be an either schema as created by Schema.schemaForEither.

    Definition Classes
    LowPriorityCodec
  29. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  30. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  31. implicit val etag: Codec[String, ETag, TextPlain]
  32. implicit val file: Codec[FileRange, tapir.TapirFile, OctetStream]
  33. implicit val fileRange: Codec[FileRange, FileRange, OctetStream]
  34. implicit val float: Codec[String, Float, TextPlain]
  35. implicit macro def formCaseClassCodec[T <: Product with Serializable](implicit conf: Configuration): Codec[String, T, XWwwFormUrlencoded]
    Definition Classes
    FormCodecMacros
  36. def formMap(charset: Charset): Codec[String, Map[String, String], XWwwFormUrlencoded]
  37. implicit val formMapUtf8: Codec[String, Map[String, String], XWwwFormUrlencoded]
  38. def formSeq(charset: Charset): Codec[String, Seq[(String, String)], XWwwFormUrlencoded]
  39. implicit val formSeqUtf8: Codec[String, Seq[(String, String)], XWwwFormUrlencoded]
  40. def fromDecodeAndMeta[L, H, CF <: CodecFormat](cf: CF)(f: (L) ⇒ DecodeResult[H])(g: (H) ⇒ L)(implicit arg0: Schema[H]): Codec[L, H, CF]
  41. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  42. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  43. def id[L, CF <: CodecFormat](f: CF, s: Schema[L]): Codec[L, L, CF]
  44. def idPlain[L](s: Schema[L] = Schema[L](SchemaType.SString())): Codec[L, L, TextPlain]
  45. implicit val inputStream: Codec[InputStream, InputStream, OctetStream]
  46. implicit val instant: Codec[String, Instant, TextPlain]
  47. implicit val int: Codec[String, Int, TextPlain]
  48. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  49. implicit val javaBigDecimal: Codec[String, BigDecimal, TextPlain]
  50. implicit val javaBigInteger: Codec[String, BigInteger, TextPlain]
  51. def json[T](_rawDecode: (String) ⇒ DecodeResult[T])(_encode: (T) ⇒ String)(implicit arg0: Schema[T]): JsonCodec[T]
  52. implicit def list[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], List[U], CF]

    Create a codec which decodes/encodes a list of low-level values to a list of high-level values, using the given base codec c.

    Create a codec which decodes/encodes a list of low-level values to a list of high-level values, using the given base codec c.

    The schema is copied from the base codec.

  53. implicit def listHead[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], U, CF]

    Create a codec which requires that a list of low-level values contains a single element.

    Create a codec which requires that a list of low-level values contains a single element. Otherwise a decode failure is returned. The given base codec c is used for decoding/encoding.

    The schema and validator are copied from the base codec.

  54. implicit def listHeadOption[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], Option[U], CF]

    Create a codec which requires that a list of low-level values is empty or contains a single element.

    Create a codec which requires that a list of low-level values is empty or contains a single element. If it contains multiple elements, a decode failure is returned. The given base codec c is used for decoding/encoding.

    The schema and validator are copied from the base codec.

  55. implicit val localDate: Codec[String, LocalDate, TextPlain]
  56. implicit val localDateTime: Codec[String, LocalDateTime, TextPlain]
  57. implicit val localTime: Codec[String, LocalTime, TextPlain]
  58. implicit val long: Codec[String, Long, TextPlain]
  59. implicit val mediaType: Codec[String, MediaType, TextPlain]
  60. def multipart(partCodecs: Map[String, PartCodec[_, _]], defaultPartCodec: Option[PartCodec[_, _]]): MultipartCodec[ListMap[String, _]]

    partCodecs

    For each supported part, a (raw body type, codec) pair which encodes the part value into a raw value of the given type. A single part value might be encoded as multiple (or none) raw values.

    defaultPartCodec

    Default codec to use for parts which are not defined in partCodecs. None, if extra parts should be discarded.

  61. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  62. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  63. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  64. implicit val offsetDateTime: Codec[String, OffsetDateTime, TextPlain]
  65. implicit val offsetTime: Codec[String, OffsetTime, TextPlain]
  66. implicit def option[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[Option[T], Option[U], CF]

    Create a codec which decodes/encodes an optional low-level value to an optional high-level value.

    Create a codec which decodes/encodes an optional low-level value to an optional high-level value. The given base codec c is used for decoding/encoding.

    The schema and validator are copied from the base codec.

  67. implicit def optionHead[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[Option[T], U, CF]

    Create a codec which requires that an optional low-level value is defined.

    Create a codec which requires that an optional low-level value is defined. If it is None, a decode failure is returned. The given base codec c is used for decoding/encoding.

    The schema and validator are copied from the base codec.

  68. def parsedString[T](parse: (String) ⇒ T)(implicit arg0: Schema[T]): Codec[String, T, TextPlain]
  69. implicit def part[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[Part[T], Part[U], CF]
  70. implicit lazy val path: Codec[FileRange, Path, OctetStream]
    Definition Classes
    CodecExtensions
  71. implicit val range: Codec[String, Range, TextPlain]
  72. def rawPart(partCodecs: Map[String, PartCodec[_, _]], defaultCodec: Option[PartCodec[_, _]]): Codec[Seq[RawPart], ListMap[String, _], MultipartFormData]
  73. implicit val scalaDuration: Codec[String, Duration, TextPlain]
  74. implicit def set[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], Set[U], CF]

    Create a codec which decodes/encodes a list of low-level values to a set of high-level values, using the given base codec c.

    Create a codec which decodes/encodes a list of low-level values to a set of high-level values, using the given base codec c.

    The schema is copied from the base codec.

  75. implicit val short: Codec[String, Short, TextPlain]
  76. implicit val string: Codec[String, String, TextPlain]
  77. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  78. implicit def textOrCloseWebSocketFrame[A, CF <: CodecFormat](implicit stringCodec: Codec[String, A, CF]): Codec[WebSocketFrame, Option[A], CF]

    A codec which expects only text and close frames (all other frames cause a decoding error).

    A codec which expects only text and close frames (all other frames cause a decoding error). Close frames correspond to None, while text frames are handled using the given stringCodec and wrapped with Some.

  79. implicit def textWebSocketFrame[A, CF <: CodecFormat](implicit stringCodec: Codec[String, A, CF]): Codec[WebSocketFrame, A, CF]

    A codec which expects only text frames (all other frames cause a decoding error) and handles the text using the given stringCodec.

  80. def toString(): String
    Definition Classes
    AnyRef → Any
  81. implicit def tupledWithRaw[L, H, CF <: CodecFormat](implicit codec: Codec[L, H, CF]): Codec[L, (L, H), CF]
  82. implicit def unwrapPart[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[Part[T], U, CF]
  83. implicit val uri: PlainCodec[Uri]
  84. implicit def usernamePassword: PlainCodec[UsernamePassword]
  85. implicit val uuid: Codec[String, UUID, TextPlain]
  86. implicit def vector[T, U, CF <: CodecFormat](implicit c: Codec[T, U, CF]): Codec[List[T], Vector[U], CF]

    Create a codec which decodes/encodes a list of low-level values to a vector of high-level values, using the given base codec c.

    Create a codec which decodes/encodes a list of low-level values to a vector of high-level values, using the given base codec c.

    The schema and validator are copied from the base codec.

  87. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  88. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  89. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  90. implicit val webSocketFrame: Codec[WebSocketFrame, WebSocketFrame, TextPlain]
  91. def xml[T](_rawDecode: (String) ⇒ DecodeResult[T])(_encode: (T) ⇒ String)(implicit arg0: Schema[T]): XmlCodec[T]
  92. implicit val zoneOffset: Codec[String, ZoneOffset, TextPlain]
  93. implicit val zonedDateTime: Codec[String, ZonedDateTime, TextPlain]

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from LowPriorityCodec

Inherited from CodecMacros

Inherited from FormCodecMacros

Inherited from CodecExtensions2

Inherited from CodecExtensions

Inherited from AnyRef

Inherited from Any

Ungrouped