property

Defines a property within this nested object.

Works the same as JsonSchemaDefinitionBuilder.property, allowing you to define nested properties with their types and constraints.

Example

obj {
property("createdAt") {
required = true
string { format = "date-time" }
}
}

Parameters

name

The property name

block

Configuration block for the property

See also