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
Some schemas have cyclical references. For example, a definition in the schema tree references a parent or ancestor
For an example in the wild see the bitbucket API swagger definition. https://api.bitbucket.org/swagger.json. The schema definition for "repository" in the definitions section has a reference to a parent repository.
Trying to use json-schema-merge-allof on this schema will cause Exception: Maximum call stack size exceeded because of infinite recursion.
For now, I can set deep: false but it would be nice if the library could detect that it is in an infinite recursion or alternatively, I could set a depth that would set the maximum recursions on a schema.
The text was updated successfully, but these errors were encountered:
I assume you use something like json-schema-ref-parser parser to dereference the schema? If you use the bundle function instead of dereference it will create a schema without circular references, but still dereference all into one schema.
Hi, I had the same problem with cyclical references, so I wrote my own implementation, which solves this problem. You can try it: https://github.com/udamir/allof-merge
Some schemas have cyclical references. For example, a definition in the schema tree references a parent or ancestor
For an example in the wild see the bitbucket API swagger definition. https://api.bitbucket.org/swagger.json. The schema definition for "repository" in the definitions section has a reference to a parent repository.
Trying to use json-schema-merge-allof on this schema will cause
Exception: Maximum call stack size exceeded
because of infinite recursion.For now, I can set deep: false but it would be nice if the library could detect that it is in an infinite recursion or alternatively, I could set a depth that would set the maximum recursions on a schema.
The text was updated successfully, but these errors were encountered: