mockyeah icon indicating copy to clipboard operation
mockyeah copied to clipboard

feat: groups record options to exclude metadata

Open AndersDJohnson opened this issue 6 years ago • 0 comments

Config groups should be able to specify whether and which query params (or other request data) is recorded. This will allow convenient aliases for common scenarios where recorded suites need to be tweaked after recording to remove certain query parameters or other data.

{
  groups: {
    users: {
       pattern: '/some/service',
       record: { query: false, body: false }
    }
  }
}
{
  groups: {
    users: {
       pattern: '/some/service',
       record: {
         query: {
           // record `someParam` always
           someParam: true,
           // for other params, require matching [name, value] pairs with string, regex, function, etc.
           '*': [/paramPrefix.*/, () => true]
         },
         body: {
           someField: true
         }
       }
    }
  }
}

AndersDJohnson avatar Jul 13 '19 17:07 AndersDJohnson