jbwheatley / pact4s

Apache License 2.0
29 stars 11 forks source link

[Verification] How to define provider state callback? #122

Closed gaeljw closed 2 years ago

gaeljw commented 2 years ago

If a consumer defines a pact using provider state callback features like .pathFromProviderState("/endpoint/${id}", "/endpoint/36"), then how to define the id value on the provider side?

Pact-JVM Junit state provider methods can return a Map of such values but I don't see an equivalent with pact4s-scalatest.

gaeljw commented 2 years ago

@jbwheatley any idea how this can be done? I'd like to help on this one but not sure where to start looking if there's something to do in pact4s.

Initially I thought the response of the setup endpoint would be used but this seems to have no effect.

I guess I should have a look to JVM Junit implementation.

benifietray commented 2 years ago

@gaeljw @jbwheatley I've been also trying to figure this. Is this not supported yet?