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

Support user specified identifier for interactions #72

Closed
bethesque opened this issue May 29, 2020 · 1 comment
Closed

Support user specified identifier for interactions #72

bethesque opened this issue May 29, 2020 · 1 comment

Comments

@bethesque
Copy link
Member

bethesque commented May 29, 2020

I'd like to make it easier to re-use the interactions that are written in a pact file for seeding other stubs. I think that allowing a user to specify their own unique identifier for an interaction would help this re-use by allowing them to:

  • easily extract a particular interaction from an existing pact file to seed a separate stub
  • select a particular interaction to be served in preference to another one when using the pact-stub-server and multiple requests may match.
  • be used to easily run a single interaction to verify for the ruby based verifiers (rather than the current requirement for setting PACT_INTERACTION and PACT_PROVIDER_STATE variables)
  • make it easier to identify the exact interactions that are causing errors, because searching for long strings can be fiddley

We do already have an identifier _id that gets assigned by the pact broker, but it isn't available unless you've published and retrieved the pact back from the broker.

The field would be optional, and the only rule would be that should be a UTF-8 string, no spaces.

@uglyog
Copy link
Member

uglyog commented Mar 8, 2021

Initial V4 implementation in Rust and JVM has an optional key attribute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants