AI REVIEWED
Module: api
File: api/schema/Schema.java (~line 179-195)
Severity: Critical
Summary
In Schema.buildTypes(), this.parent.types() is called but the result is never used. Child schemas do not inherit any types from their parent, requiring all types to be re-registered in every subclass.
Expected Behavior
A child schema should inherit type definitions from its parent schema. Only new or overridden types need to be registered in the child.
Actual Behavior
Parent types are fetched but discarded. Subclasses must re-register all types they need, violating the DRY principle and making schema evolution error-prone.
Suggested Fix
Copy parent types into the child's TypeRegistry before calling registerTypes(), or clearly document this as an intentional design decision if inheritance is not desired.
AI REVIEWED
Module: api
File:
api/schema/Schema.java(~line 179-195)Severity: Critical
Summary
In
Schema.buildTypes(),this.parent.types()is called but the result is never used. Child schemas do not inherit any types from their parent, requiring all types to be re-registered in every subclass.Expected Behavior
A child schema should inherit type definitions from its parent schema. Only new or overridden types need to be registered in the child.
Actual Behavior
Parent types are fetched but discarded. Subclasses must re-register all types they need, violating the DRY principle and making schema evolution error-prone.
Suggested Fix
Copy parent types into the child's
TypeRegistrybefore callingregisterTypes(), or clearly document this as an intentional design decision if inheritance is not desired.