Skip to content

A Paw Extension to find a random index path based on another request. Also includes specific aliased index lookup.

License

Notifications You must be signed in to change notification settings

coder4life/Paw-RindexDynamicValue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

29 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rindex Dynamic Value (Paw Extension)

Introduction

A Paw Extension to find a random index path based on another request. Also includes specific aliased index lookup.

How to Use

Rindex includes simple index tools to load either a specific index {int}, random index {*}, or aliased index {first @f, middle @m, last @l}. The goal is to allow a simplified way to write tests or dependent requests that utilities a wide range of data. Randomizing the data ensures that the request will work for multiple cases derived from the dependent result of the request set.

Ruleset

users[*].name; // random index of users list and name
users[*].friends[*].name; // random index users list; and random index of that user friends list and name
users[@f].name; // first index of users list and name
users[@m].name; // middle index of users list and name
users[@l].name; // last index of users list and name
users[2].name; // third index of users list and name (follows normal array access)

Steps to Use

1. Make a request for dependent data for the NEW Request

2. From EXISTING Request copy a key path (we will change request later)

3. In the NEW Request type the paw dynamic variable.

4. Copy and paste the keypath from the EXISTING to the NEW Request.

5a. Change keypath according to the rules outlined above.

OR

License

See LICENSE.md

About

A Paw Extension to find a random index path based on another request. Also includes specific aliased index lookup.

Resources

License

Stars

Watchers

Forks

Packages

No packages published