validateJsonSchema function
A validator for the JSON Schema subset app_intents_codegen:describe
emits: type (a name or a list), enum, properties, required,
additionalProperties: false, items, anyOf and format: date-time.
Anything else in a schema (title, x-entity, …) is ignored, so a schema
with keywords this validator does not know never fails a value.
Implementation
List<String> validateJsonSchema(
Object? value,
Map<String, Object?> schema, {
String path = r'$',
}) {
final errors = <String>[];
_validate(value, schema, path, errors);
return errors;
}