JsonSchemaBuilder
Builder for JsonSchema instances.
This is the top-level builder used within the jsonSchema DSL function. It configures the schema's metadata and delegates to JsonSchemaDefinitionBuilder for the actual schema structure.
Properties
name: The schema name (required)
strict: Whether the schema enforces strict validation (default: false)
description: Optional human-readable description
Example
jsonSchema {
name = "UserStatus"
strict = true
description = "Describes user account status"
schema {
property("status") {
string {
enum = listOf("active", "inactive", "pending")
}
}
}
}Content copied to clipboard