You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 5dd141d
Browse filesBrowse the repository at this point in the historyBrowse files
fix: make reference equality consistent and fail clearly on unresolved references
Reference classes overrode Equals and == without GetHashCode, so equal
references hashed differently. LINQ Distinct kept duplicates, which made
V2 serialization with inlined references throw "An item with the same key
has already been added" when two references to the same recursive schema
were found in a loop.
- Add GetHashCode, using the resolved target's hash (consistent with
references comparing equal to their target) or the $ref string when
unresolved.
- Unresolved references now compare their $ref strings instead of all
being equal (null == null), and Equals(null element) returns false.
- Setters, inlined serialization and bindings collection operations on an
unresolved reference throw InvalidOperationException naming the $ref
instead of NullReferenceException. Boolean schema getters return false
when unresolved, like the other getters return null.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0 commit comments