mockyeah
mockyeah copied to clipboard
feat: groups record options to exclude metadata
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
}
}
}
}
}