AI REVIEWED
Module: schema-tools
File: schematools/validation/ConventionChecker.java (~line 143-146)
Severity: Medium
Summary
When schema.types().get(ref) returns null, field name checking is silently skipped. No warning is emitted, hiding potential configuration issues.
Expected Behavior
A warning should be emitted when a registered type reference cannot be resolved to an actual Type.
Actual Behavior
final Type<?> type = schema.types().get(ref);
if (type != null) {
checkFieldNames(type, typeName, schemaLocation, rules, result);
}
// else: silently ignored
Suggested Fix
if (type == null) {
result.add(ValidationIssue.warning("CONVENTION_TYPE_NOT_FOUND",
"Type '" + typeName + "' is registered but cannot be resolved",
schemaLocation));
} else {
checkFieldNames(type, typeName, schemaLocation, rules, result);
}
AI REVIEWED
Module: schema-tools
File:
schematools/validation/ConventionChecker.java(~line 143-146)Severity: Medium
Summary
When
schema.types().get(ref)returns null, field name checking is silently skipped. No warning is emitted, hiding potential configuration issues.Expected Behavior
A warning should be emitted when a registered type reference cannot be resolved to an actual Type.
Actual Behavior
Suggested Fix