Skip to content

Support user specified identifier for interactions #72

Closed
@bethesque

Description

@bethesque

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions