pact-provider-verifier icon indicating copy to clipboard operation
pact-provider-verifier copied to clipboard

feat(generators): Pass back result from provider state setup URL

Open hhhonzik opened this issue 5 years ago • 5 comments

Addressing issue I've previously mentioned here https://github.com/pact-foundation/pact-provider-verifier/issues/49

Best is to see what's inside a new test contract - we provide a generators object which can override the tested request. I've implemented generator ProviderState, which although is not part of the spec, is implemented in pact-jvm described here

I just want to raise a conversation early, if the approach is approvable in a future or I should change the implementation.

      ....
      "request": {
        "method": "GET",
        "path": "/book/1",
        "generators": {
          "path": {
            "type": "ProviderState",
            "expression": "/book/${id}"
          }
        }
      },
      ....

TODO:

  • [ ] add generators to all request objects based on specification
  • [ ] generators support in https://github.com/pact-foundation/pact-support/pull/79
  • [ ] generators support in https://github.com/pact-foundation/pact-ruby/pull/209

hhhonzik avatar Feb 23 '20 23:02 hhhonzik

@uglyog what's with the generator not being part of the spec?

bethesque avatar Feb 27 '20 03:02 bethesque

Because you never wrote the spec for it ;-)

uglyog avatar Feb 27 '20 03:02 uglyog

I was busy :P

Looks good though @hhhonzik, keep going!

bethesque avatar Feb 27 '20 03:02 bethesque

Where is this at @hhhonzik?

bethesque avatar Mar 29 '21 04:03 bethesque

Hey @hhhonzik thanks for your efforts on this pull request and others,

Are you still looking to work on them, or would you require feedback or anything to help. If not thank you and we will look to see how we can incorporate these ideas in the future

https://github.com/pact-foundation/pact-provider-verifier/issues/49 https://github.com/pact-foundation/pact-ruby/pull/209 https://github.com/pact-foundation/pact-support/pull/79

YOU54F avatar Apr 25 '22 13:04 YOU54F

closed in favour of #85 and https://github.com/pact-foundation/pact-ruby/pull/273

YOU54F avatar Aug 06 '24 11:08 YOU54F