Skip to content

Properties

class Properties(val properties: Map<String, Schema<*>>, factory: BsonFactory) : Schema.SimpleConstraint<Any> 

The properties that must be present in an object.

Each key of properties is the name of a property of the object; its value must follow the associated schema.

If this property does not contain an object, this constraint is ignored.

If the property AdditionalProperties is not present, this constraint is ignored.

Constructors

Properties

constructor(properties: Map<String, Schema<*>>, factory: BsonFactory)

Properties

name

val name: String

The name of this constraint.

properties

Functions

toString

override fun toString(): String

JSON representation of this constraint object.

writeTo

override fun writeTo(writer: BsonFieldWriter)

Writes this object to the provided writer.