-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation mismatch on what is expected by the provider state setup url endpoint #19
Comments
Yes, you're right - the array was an attempt to future proof the code in order to get ready for v3. However, what I didn't think about at the time was that the array will actually be an array of objects, as there are extra parameters that come along with the name. So really, you should just stick with the Let's get the documentation updated for the python repo. |
so will the |
It will be updated to a list of objects, with the unfortunate side effect of breaking anyone who is currently using the string list. We'll have to make a clear note of that in the release notes, and it will be a major version release. |
Tracking via v3 meta issue pact-foundation/pact-ruby#318 so will close this off, with this being the required way forward when we proceed
pact-python will leverage the pact_ffi library, which you can read about here |
The documentation for this project for provider states says that the provider state endpoint should accept 2 fields:
consumer
andstate
. However, when runningpact-provider-verifier
with aprovider-states-setup-url
defined, the actual provider state requests have 3 fields:consumer
andstate
, which are both strings, but alsostates
, which is an array containing the same string that was defined instate
.Looking at the documentation for pact-python, however, implies that my endpoint should be expecting only
consumer
andstates
, but notstate
.I assume this is a backwards/forwards compatibility thing, and that as pact v2 gives way to v3, the
state
field will be deprecated, but the differing documentation makes it difficult to know how to implement my endpoint.Do reproduce the issue:
python reflect.py
, which will start a simple server that will print the request received to the console, then reply with a 200.pact-provider-verifier --provider-states-setup-url=http://localhost:8081/api/_pact/state --provider-base-url=http://localhost:8081 test/pacts/myconsumer-myprovider.json
state
andstates
fields are present:The text was updated successfully, but these errors were encountered: