Skip to content

fix: JSON Collection Unwrapping Consistency in Programmatic Interface#3189

Open
Shiva953 wants to merge 1 commit intopostmanlabs:developfrom
Shiva953:fix/unwrap-json-collection-programmatic
Open

fix: JSON Collection Unwrapping Consistency in Programmatic Interface#3189
Shiva953 wants to merge 1 commit intopostmanlabs:developfrom
Shiva953:fix/unwrap-json-collection-programmatic

Conversation

@Shiva953
Copy link
Copy Markdown

@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
Copy Markdown
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.

1 participant