class CreateDerivedEnumerationPickler[T](validator: Enumeration[T], schemaAnnotations: SchemaAnnotations[T])(implicit evidence$1: ClassTag[T])
A builder allowing deriving Pickler for enums, used by Pickler.derivedEnumeration. Can be used to set non-standard encoding logic, schema type or default value for an enum.
Specify how values of this type can be encoded to a raw value (typically a String; the raw form should correspond with schemaType). This encoding will be used when writing/reading JSON and generating documentation. Defaults to an identity function, which effectively means that .toString will be used to represent the enumeration in the docs.
schemaType
The low-level representation of the enumeration. Defaults to a string.
Creates the Pickler assuming the low-level representation is a String. Provide your custom encoding function for representing an enum value as a String. It will be used to represent the enumeration in JSON and documentation. This approach is recommended if you need to encode enums using a common field in their base trait, or another specific logic for extracting string representation.
Creates the Pickler assuming the low-level representation is a String. Provide your custom encoding function for representing an enum value as a String. It will be used to represent the enumeration in JSON and documentation. This approach is recommended if you need to encode enums using a common field in their base trait, or another specific logic for extracting string representation.
Creates the Pickler assuming the low-level representation is a String. The encoding function passes the object unchanged (which means .toString will be used to represent the enumeration in JSON and documentation). Typically you don't need to explicitly use Pickler.derivedEnumeration[T].defaultStringBased, as this is the default behavior of Pickler.derived for enums.
Creates the Pickler assuming the low-level representation is a String. The encoding function passes the object unchanged (which means .toString will be used to represent the enumeration in JSON and documentation). Typically you don't need to explicitly use Pickler.derivedEnumeration[T].defaultStringBased, as this is the default behavior of Pickler.derived for enums.