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: record groups #252

Closed
AndersDJohnson opened this issue Jan 27, 2019 · 0 comments · Fixed by #272
Closed

feat: record groups #252

AndersDJohnson opened this issue Jan 27, 2019 · 0 comments · Fixed by #272
Assignees

Comments

@AndersDJohnson
Copy link
Member

We should support record groups/aliases so that we can store common regexes for --only rules in configuration and refer to them by those aliases.

So that rather than having to write:

mockyeah record --only '(/api/v(.*)/users)|/api/v(.*)/posts)'

We can write:

mockyeah record --groups users,posts

Where we have those regexes defined in config as:

{
  "groups": {
    "users": "/api/v(.*)/users",
    "posts": "/api/v(.*)/posts"
  }
}

We could also use this feature to store recorded fixture data under a subdirectory specific to the group (though not recordings, since they can hit multiple URLs matching multiple groups).

@AndersDJohnson AndersDJohnson self-assigned this Jan 27, 2019
@AndersDJohnson AndersDJohnson changed the title feat: record groups/aliases feat: record groups Feb 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant