Closed bethesque closed 7 years ago
Is this still an issue? I want to close off the corresponding issue in the specification project.
Yeah, it is. I'll put a fix in for it this week. For now, I'll set both provider_state, and providerState, and check for providerState first on the provider side. That way it should handle the transition gracefully.
It already does when reading
@provider_state = attributes[:provider_state] || attributes[:providerState]
https://github.com/bethesque/pact-support/blob/master/lib/pact/consumer_contract/interaction.rb#L18
FYI we now have two downstream issues logged at https://github.com/pact-foundation/pact-go/issues/16 and https://github.com/pact-foundation/pact-js/issues/34 (they both use this under the hood to generate contracts)
Yeah, go needs to use providerState. The underscored one is way way outdated. Is there some code somewhere that is being copied that is propagating this misunderstanding? All the pact specs should be using providerState.
I can update JS/Go to send provider state in (via the HTTP interface) as providerState
, the probably I'm seeing is that when we use the Mock Service (which I think uses this Gem to do it), it generates a pact file with provider_state
- is this the right place to track the issue?
It's actually in the mock service code, but we already have enough issues, let's leave this here!
Done. https://github.com/pact-foundation/pact-mock_service/commit/6ae77686c1595a405322ba0c6b894500c7081f55
[Hides head in shame]
https://github.com/bethesque/pact-specification/issues/9