SchemaUtils

Utility class for validating schemas.

A schema that declares no type constrains nothing, so any value satisfies it. A schema that carries anyOf is satisfied only when the value matches one of the alternatives, and that holds alongside whatever else the schema declares.

Functions

Link copied to clipboard
fun validateMapOnSchema(args: Map<String, Any?>, schema: Schema, argsName: String): Result<Unit>

Validates a map against a schema.

Link copied to clipboard

Parses a model output string as JSON and validates it against a schema.