Config

zio.blocks.schema.bson.BsonSchemaCodec.Config
See theConfig companion object
class Config

Configuration for the BSON schema codec.

Value parameters

classNameMapping

The mapping of class names.

ignoreExtraFields

If true (default), extra fields in BSON documents are silently ignored during decoding. If false, decoding will fail with an error when encountering unknown fields.

sumTypeHandling

The handling of sum types.

useNativeObjectId

If true, org.bson.types.ObjectId will be encoded/decoded using BSON's native ObjectId type (BsonType.OBJECT_ID). If false, ObjectId will be treated as a regular wrapper and encoded as a string. Default is false. Note: When using ObjectIdSupport.objectIdSchema, this is automatically detected regardless of this setting.

Attributes

Companion
object
Source
BsonSchemaCodec.scala
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Config

Members list

Value members

Concrete methods

def withClassNameMapping(classNameMapping: TermMapping): Config

Attributes

Source
BsonSchemaCodec.scala
def withIgnoreExtraFields(ignoreExtraFields: Boolean): Config

Attributes

Source
BsonSchemaCodec.scala
def withNativeObjectId(useNativeObjectId: Boolean): Config

Attributes

Source
BsonSchemaCodec.scala
def withSumTypeHandling(sumTypeHandling: SumTypeHandling): Config

Attributes

Source
BsonSchemaCodec.scala

Concrete fields

val ignoreExtraFields: Boolean

Attributes

Source
BsonSchemaCodec.scala
val useNativeObjectId: Boolean

Attributes

Source
BsonSchemaCodec.scala