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.
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:
newman/lib/run/options.js
to ensure consistent unwrapping behaviour for JSON collections.