Closed paztis closed 3 years ago
I've create a PR with a new method rereference that exactly do this job in sync: #221
Cab you look at it ?
Hello
Any new about it ? Have you found any time to look at the PR ?
Why would you dereference AND bundle? I don't understand the use case so its hard to imagine a solution.
My ui is based over schemas. I need to use schemas everywhere, and don't want to support reference in tons of places.
But my ui need also to save in session storage the schemas. And I cannot serialize the without re-referencing them
Le jeu. 6 mai 2021 à 13:52, Phil Sturgeon @.***> a écrit :
Why would you dereference AND bundle? I don't understand the use case so its hard to imagine a solution.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/APIDevTools/json-schema-ref-parser/issues/219#issuecomment-833462253, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIKMMLCZK3WGMIQMKANKDTTMJ7JPANCNFSM4Y65A47A .
@paztis can you see if this works in 9.0.9? We've done a lot of work on making various circular scenarios work better.
If a schema has circular ancestor, it is possible to dereference it but if we want to re-reference it (for stringification for example), it is impossible to bundle it.
Tested in the unit tests with specs/circular/circular-indirect-ancestor.yaml
This crashed with Maximum call stack in 2 places:
in resolve-externals.js crawl function easily fixable with this code:
then in bundle.js in crawl function here I don't know how to create new references in case of circular detection