Version 4 cyclic refs freezes without any error
See original GitHub issueWhat did you do
I just upgraded to version 4 from verison 3 and tried to generate md files by running my NPM docs script:
npm run docs
# which executs: jsonschema2md -o docs/ -x docs/ -d schemas/ -e json
What did you expect to happen
All markdown files to be generated
What happened
The CLI programm freezes without any error. Last log is:
loading schemas
What’s your environment
- Operating System: macOS Catalina
10.15.2(19C57) - node.js version:
v10.15.0
Do you have example files:
Issue Analytics
- State:
- Created 4 years ago
- Comments:22 (8 by maintainers)
Top Results From Across the Web
Circular dependency while executing cx_Freeze result
1 Answer 1 · Thanks Marcelo ! It seems to work since I don't have the error message anymore. · The answer is...
Read more >Win2016 ReFs repository server freeze during Back-up copy
Backups and copies show messages like this: 'Unable to allocate processing resources.
Read more >An application stops responding when a file has a circular ...
Fixes a problem in which an application stops responding when a file has a circular reference in Windows 7 or Windows Server 2008...
Read more >Freeze or crash when opening drawings in AutoCAD products
Causes: The following are causes of this issue: Installation. AutoCAD product is not up to date. Software corruption.
Read more >Circular Reference Warning Then Excel Crashes - Reddit
Every time I open I there is a circular reference error message, ... I've pulled up previous versions of the same file from...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Ah, then the fix should be relatively easy. We write the JSON again so that
my.schema.jsonmy.description.mdandmy.1.example.jsonget merged into one document. The separate documents are easier to author, but the merged document is easier to consume by other tooling.@AndyOGo a quick workaround for you might be to disable the JSON output.
@tripodsan I think our error is that the
writeJsonSyncfunction tries to serialize the proxied JSON Schema, which is recursive and gets caught up in a loop. We can circumvent this by merging the description and examples into the original (non-proxied and non-recursive) JSON and then just writing this.The markdown processing doesn’t get caught in an endless loop, because we generate one output for each schema, and the schema identity is independent from the depth in the recursive tree.
@AndyOGo the next release should have a fix. At least a fix that works with the example you’ve shared.