validateJsonSchema function
Validates value against schema, returning a list of violation messages
(empty when valid). path names the root in messages (defaults to args).
Implementation
List<String> validateJsonSchema(
Object? value,
Map<String, Object?> schema, {
String path = 'args',
}) {
final errors = <String>[];
_validate(value, schema, path, errors);
return errors;
}