highsource / highsource/jsonix

[Node v10.15.0 64-bit] Calling Jsonix.Context([...]) results in "Uncaught RangeError: Maximum call stack size exceeded"

Open
#221 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
369
Forks
85
PR merge metrics
No merged PRs in 30d

Description

[Jsonix_Files.zip](https://github.com/highsource/jsonix/files/3306287/Jsonix_Files.zip)

I am attempting to create a node.js client for a vendor's API.
I used the Jsonix Schema Compiler to generate the JavaScript file for creditcard_loan, and I can run that just fine in my unit tests.
When I run my unit tests for personal_loan though I get
```
RangeError: Maximum call stack size exceeded
at Class.build (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:2232:20)
at Class.build (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:2236:25)
...
at Class.build (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:2236:25)
at Class.buildTypeInfos (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:3993:13)
at Class.processModules (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:5921:13)
at Class.initialize (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:5889:10)
at new Class (C:\Users\jwmccann\source\repos\loanspq\node_modules\jsonix\jsonix.js:44:19)
```
I found issue #114 and tried to follow the guidance of using a bindings file, but didn't get any where.
From what seemed to be the root cause of issue #114 I looked through the generated JavaScript for personal_loan and found that the ```DECLARATIONS``` under ```PERSONALBASEAPPLICANT``` may be the issue. So I tried commenting out the ```DECLARATIONS``` element from the personal_loan.xsd, regenerated the JavaScript, and my unit tests started passing. When I compared this ```DECLARATIONS``` to the creaditcard_loan I found that the creditcard_loan appears to have the same structure as personal_loan, so I am struggling to why the creditcard_loan works, but the personal_loan does not.

Is there anything here that you can help with? Or any more information you might need to be able to help?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.