Create examples with scripting
I am looking for an option to create examples programatically.
The desired scenario:
- Send a request to the API server.
- Save a response as an example. Set the query param of the example.
- Loop to step 1 (as long as the responses are available).
- Set up a mock server with the stored examples.
I’ve already tried:
Up to now, I am only able to:
- Store the responses programatically into environment variables (response1, response2 etc)
- Set up the examples manually using {{reponse1}} in the response body
- Set the example params manually.
- Start the mock server.
I did a research of Collection SDK. SDK would help me to make a collection from scratch, but not sure how to use it in an existing collection, just to make small changes.