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

Reduced collection size by keeping maximum generated elements for array as 1 for larger schemas. #737

Merged
merged 2 commits into from
Jun 20, 2023

Conversation

VShingala
Copy link
Member

Overview

This PR adds support for restricting the elements generated in collection from default 2 to 1 element based upon the schema size. Current threshold for this is for schemas larger than 50 KB.

Solution

We've removed the part where minItems and maxItems were had coded into schema while resolution and added support for this in json-schema-faker library. In jsf library we've added similar logic by usage of options that can be configured while using this library. And while faking the schema, we use these options depending upon the schema size.

@VShingala VShingala merged commit 5210cd3 into develop Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants