check method

SchemaValidationResult check(
  1. String typeName,
  2. IPLDNode node
)

Validates node against typeName, collecting every mismatch with a precise path instead of stopping at the first boolean answer.

This entry point is synchronous and therefore never resolves links: expectedType clauses are kind-checked only. Use checkAsync to enforce them.

Throws IPLDSchemaError for malformed schema definitions.

Implementation

SchemaValidationResult check(String typeName, IPLDNode node) {
  final validator = _SchemaValidator(_schema, adlTypes: _adlTypes);
  validator._validateType(node, _typeDef(typeName), typeName: typeName);
  return SchemaValidationResult(validator.errors);
}