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

fix: JSON Collection Unwrapping Consistency in Programmatic Interface #3189

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Shiva953
Copy link

@Shiva953 Shiva953 commented Jan 9, 2024

This pull request addresses an inconsistency in the programmatic interface of Newman related to the handling of JSON collections as described in #3179. When a collection is passed directly as JSON, there was unexpected behaviour compared to loading it from an external file, especially when unwrapping was required.

Changes Made:

  • Modified the extractModel function in newman/lib/run/options.js to ensure consistent unwrapping behaviour for JSON collections.
  • Added checks for the presence of the "values" property to distinguish between variables and other objects.

Fixes inconsistency in handling JSON collections loaded directly in the
programmatic interface. Checks for "values" property to distinguish
variables from collections, ensuring consistent behavior.

- Modified extractModel function in newman/lib/run/options.js
@Shiva953
Copy link
Author

Shiva953 commented Jan 9, 2024

would love a review for this, @codenirvana

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.

None yet

1 participant