Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: groups pattern full match support #401

Open
AndersDJohnson opened this issue Jul 13, 2019 · 0 comments
Open

feat: groups pattern full match support #401

AndersDJohnson opened this issue Jul 13, 2019 · 0 comments
Assignees

Comments

@AndersDJohnson
Copy link
Member

AndersDJohnson commented Jul 13, 2019

Config groups for recording should support full match objects to specify which requests are recorded. This would give full parity with the API for mocks. We would support a limited subset with at least matches in static JSON config (the same subset supported in #414 - and maybe regex too if we solve #276 or with { path: { "$regex": "a.*b" } }), full features with programmatic use, and maybe also some limited support with CLI args for dynamic groups (#274).

So we could write the following:

{
  groups: {
    users: {
      match: {
        path: "/some/service"
        query: {
          someParam: /someValue.*/,
          otherParam: value => ['a', 'b', 'c'].includes(value)
        }
      }
    }
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant