Hi, is it possible to inject dynamic ids for parts...
# pact-jvm
f
Hi, is it possible to inject dynamic ids for parts of the body rather than only the path or query from provider state such as in here https://pactflow.io/blog/injecting-values-from-provider-states/? Thank you.
j
Yes, You should be able to use something like this.
Copy code
bodyObject.valueFromProviderState("fieldNAme", "providerStateFieldName", "exampleValue")
f
Thanks. So do we then lose the matchers for the types?
j
I think so. I suspect because you're matching the actual value it was assumed you don't need to care about the type.
f
hmm..
okay, thanks. I’m off today but will give it a go tomorrow.