Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Data is not getting generated for all the properties, few properties are missing. #592

Closed
KarthikGowdaUN opened this issue Jun 15, 2020 · 5 comments

Comments

@KarthikGowdaUN
Copy link

Data is not getting generated for all the properties, have to try couple of times, then only it gets generated for all the properties.
Even if the data is generated, not all the objects inside an array will have all the properties, out of 5 objects, only one will have all the properties..
Attached is the schema file, which i used for testing purpose.

Suggestion : If the element is an array, try copying all the properties in all the objects or just return the object, which has all the properties.
schema_v4.txt

@pateketrueke
Copy link
Member

Can you test the same schema against the develop sources? Thank you!

@KarthikGowdaUN
Copy link
Author

@pateketrueke , I tested this in angular project installing it via npm, tried both
npm install typescript-json-schema-faker
npm install json-schema-faker

by calling asyncFake() and resolve() method..it doesn't produce the data for all the properties, have to recursively call the methods..

Regards,
Karthik

@pateketrueke
Copy link
Member

Which version are you using then?

I tried your schema in our online webapp and seems to be working: https://json-schema-faker.js.org/#gist/38b5265c5f54eea8c7d6c65948b7b616

@KarthikGowdaUN
Copy link
Author

@pateketrueke , I'm using the latest version.

I tried the below schema in both online webapp as well as npm package. It's not generating any value, page is becoming unresponsive
schema_v4_1.txt

@pateketrueke
Copy link
Member

I see, the references in such schema are causing too much recursion: Error: RangeError: Maximum call stack size exceeded

I'll investigate more about this issue, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants