vulcan.generic

Type members

Classlikes

final class AvroDoc(val doc: String) extends StaticAnnotation

Annotation which can be used to include documentation in derived schemas.

Annotation which can be used to include documentation in derived schemas.

The annotation can be used in the following situations.

  • Annotate a type for enum documentation when using deriveEnum.
  • Annotate a type for fixed documentation when using deriveFixed.
  • Annotate a case class for record documentation when using Codec.derive from the generic module.
  • Annotate a case class parameter for record field documentation when using Codec.derive from the generic module.
final class AvroName(val name: String) extends StaticAnnotation

Annotation which can be used to alter the record name in derived schemas.

Annotation which can be used to alter the record name in derived schemas.

The annotation can be used in the following situations.

  • Annotate a type for enum name when using deriveEnum.
  • Annotate a type for fixed name when using deriveFixed.
  • Annotate a case class for record name when using Codec.derive from the generic module.
  • Annotate a case class parameter for record field name when using Codec.derive from the generic module.
final class AvroNamespace(val namespace: String) extends StaticAnnotation

Annotation which can be used to set the namespace in derived schemas.

Annotation which can be used to set the namespace in derived schemas.

The annotation can be used in the following situations.

  • Annotate a type for enum namespace when using deriveEnum.
  • Annotate a type for fixed namespace when using deriveFixed.
  • Annotate a case class for record namespace when using Codec.derive from the generic module.
final class AvroNullDefault(val enabled: Boolean) extends StaticAnnotation

Annotation which can be used to enable/disable explicit default null values for nullable fields in derived schemas.

Annotation which can be used to enable/disable explicit default null values for nullable fields in derived schemas.

The annotation can be used in the following situations.

  • Annotate a case class to enable/disable explicit default null values in the schema for all nullable fields when using Codec.derive from the generic module.
  • Annotate a case class parameter to enable/disable explicit default null value in the schema for this specific nullable field when using Codec.derive from the generic module.

Parameter annotation takes precedence over case class one when both are used.

Companion:
object
Companion:
class
final implicit implicit class MagnoliaCodec extends Derivation[Codec]

Value members

Concrete methods

inline def deriveEnum[A](symbols: Seq[String], encode: A => String, decode: String => Either[AvroError, A]): Aux[EnumSymbol, A]

Returns an enum Codec for type A, deriving details like the name, namespace, and AvroDoc documentation from the type A using reflection.

Returns an enum Codec for type A, deriving details like the name, namespace, and AvroDoc documentation from the type A using reflection.

inline def deriveFixed[A](size: Int, encode: A => Array[Byte], decode: Array[Byte] => Either[AvroError, A]): Aux[Fixed, A]

Returns a fixed Codec for type A, deriving details like the name, namespace, and AvroDoc documentation from the type A using reflection.

Returns a fixed Codec for type A, deriving details like the name, namespace, and AvroDoc documentation from the type A using reflection.

Implicits

Implicits

final implicit def MagnoliaCodec(codec: Codec.type): MagnoliaCodec