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
Schemas are crawled for completions with a given depth limit. However composite schemas (e.g. allOf, anyOf) are currently not counted as child schemas and will not count towards the schema depth. Thus it is possible to cause a stack overflow by mutually referencing schemas that are all composite schemas themselves (e.g. Target in https://raw.githubusercontent.com/metalbear-co/mirrord/main/mirrord-schema.json).
The fix itself is trivial, just treat composite schemas as children. However this will change the semantics of the user-provided limit that restricts the length of the suggested dotted keys.
To handle this properly:
We should treat the current depth as some internal hard-limit to prevent infinite recursions.
The user-defined limit will apply after all schemas are collected, thus will not affect performance anymore but purely UX.
The text was updated successfully, but these errors were encountered:
Schemas are crawled for completions with a given depth limit. However composite schemas (e.g. allOf, anyOf) are currently not counted as child schemas and will not count towards the schema depth. Thus it is possible to cause a stack overflow by mutually referencing schemas that are all composite schemas themselves (e.g.
Target
in https://raw.githubusercontent.com/metalbear-co/mirrord/main/mirrord-schema.json).The fix itself is trivial, just treat composite schemas as children. However this will change the semantics of the user-provided limit that restricts the length of the suggested dotted keys.
To handle this properly:
The text was updated successfully, but these errors were encountered: