zio.schema.annotation
Members list
Type members
Classlikes
Annotation for specifying an alternate identity for a case of an enum. Currently, the subtype name is always used.
Annotation for specifying an alternate identity for a case of an enum. Currently, the subtype name is always used.
This is the dual of @fieldName
, but for sums rather than products.
Value parameters
- name
-
The alternate name to use for the case.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation for specifying a list of aliases if the case name is somehow known by.
Annotation for specifying a list of aliases if the case name is somehow known by.
Value parameters
- aliases
-
A variable-length sequence of Strings representing the aliases of the case.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
When applied to a Schema.Dynamic schema, indicates that the dynamic value should be directly mapped to the target codec if possible.
When applied to a Schema.Dynamic schema, indicates that the dynamic value should be directly mapped to the target codec if possible.
For example the JSON codec can encode DynamicValue.Record to a JSON object directly instead of encoding the DynamicValue structure.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation used to specify the name of a field that will be used to contain the id which identifies which term in an enum is being serialized / deserialized.
Annotation used to specify the name of a field that will be used to contain the id which identifies which term in an enum is being serialized / deserialized.
For example, if you set @discriminatorName("type")
, then a field called "type" will be used to store the identity of the case of the enum that is being serialized / deserialized.
Value parameters
- tag
-
the name of the field that will be used to store the identity of the case of the enum
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation specifying the default value that should be utilized when the field is not present during deserialization. This is similar to @optionalField
, except that the default value is user-defined rather than computed automatically using the field schema.
Annotation specifying the default value that should be utilized when the field is not present during deserialization. This is similar to @optionalField
, except that the default value is user-defined rather than computed automatically using the field schema.
Value parameters
- value
-
The default value to use for the field.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
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.
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
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation for specifying a list of aliases if the field is somehow known by.
Annotation for specifying a list of aliases if the field is somehow known by.
Value parameters
- aliases
-
A variable-length sequence of Strings representing the aliases of the field.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Indicates that an Enum should be encoded without any specific discriminator, relying on fallback on failure when decoding.
Indicates that an Enum should be encoded without any specific discriminator, relying on fallback on failure when decoding.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation specifying that deserialization should not fail even if a value of this type is not specified.
Annotation specifying that deserialization should not fail even if a value of this type is not specified.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation for specifying an alternate name for a record.
Annotation for specifying an alternate name for a record.
Value parameters
- name
-
The alternate name to use for the record.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation specifying that deserialization should reject payloads that contain more fields than specified.
Annotation specifying that deserialization should reject payloads that contain more fields than specified.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation specifying that serialization should make no effort to encode the case to which the annotation is applied.
Annotation specifying that serialization should make no effort to encode the case to which the annotation is applied.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Annotation specifying that serialization should make no effort to encode the field to which the annotation is applied.
Annotation specifying that serialization should make no effort to encode the field to which the annotation is applied.
This is the dual of @optionalField
.
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all
Attributes
- Supertypes
-
trait Serializabletrait Producttrait Equalstrait StaticAnnotationclass Annotationclass Objecttrait Matchableclass AnyShow all