stoplightio / desktop

The Stoplight desktop app + issues repository.
https://stoplight.io
78 stars 13 forks source link

Question; Can you loop over a step multiple times based on another step? #392

Open TheBabaYaga opened 4 years ago

TheBabaYaga commented 4 years ago

Hi,

I was wondering if it's possible to loop over a step multiple times based on the output of another step.

Use case:

We have 2 api calls;

The collection api call returns something like:

{ "data": [ { "id": "12345" }, { "id": "6789" } ] }

Based on this output, I want to run a test for each object inside the data collection so that in this case 2 times the detail step is ran.

I can't find any documentation about the possibility to execute a step based on another steps data. I know you can use the ctx var; but that's for passing a single value.