Skip to content

Fixed issue where for type array examples with more than 2 elements were not used. #318

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

Merged
merged 3 commits into from
Jan 25, 2021

Conversation

VShingala
Copy link
Member

This PR fixes issue with schema example validation before assignment for type array.

postmanlabs/postman-app-support#9344


// avoid minItems and maxItems while checking for valid examples
if (optionAPI('avoidExampleItemsLength') && _.get(schema, 'type') === 'array') {
clonedSchema = _.cloneDeep(schema);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use _.clone for 1 level cloning.

@VShingala VShingala merged commit 20712a6 into develop Jan 25, 2021
@umeshp7 umeshp7 deleted the feature/array-example-fix branch November 24, 2021 06:42
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.

1 participant