ElicitRequestedSchemaBuilder

DSL builder for constructing ElicitRequestParams.RequestedSchema instances.

Defines the JSON Schema structure for data to be collected from the user. Only supports top-level primitive properties.

Required

Optional

  • required - List of required property names

Example:

requestedSchema {
properties {
put("username", JsonObject(mapOf(
"type" to JsonPrimitive("string"),
"description" to JsonPrimitive("Your username")
)))
}
required = listOf("username")
}

See also

Properties

Link copied to clipboard

List of required property names. If null, all fields are optional.

Functions

Link copied to clipboard

Sets the schema properties using a DSL builder.

fun properties(properties: JsonObject)

Sets the schema properties directly.