fieldName

zio.schema.annotation.fieldName
final case class fieldName(name: String) extends StaticAnnotation

Annotation for specifying an alternate identity for a field of a case class. Currently, the field name is always used. But sometimes, it can be convenient to have control over that name.

For example, the API expects username to be stored as user_name, but inside the case class, the field is named username. Such an annotation, applied directly to the field, could indicate a different identity for the field than the field name itself.

Value parameters

name

The alternate name to use for the field.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Annotation
class Object
trait Matchable
class Any
Show all

Members list

Value members

Inherited methods

Attributes

Inherited from:
Product

Attributes

Inherited from:
Product