You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using a ruby-based pact-mock-service on the consumer side to generate a pact file and verifying the contract by using pact-jvm (more specifically the gradle plugin). One of our resources accepts a bunch of query parameters, and the generated contract looks like this:
As you can see the query is encoded on the ruby side, however, apparently the java side expects a decoded value there and we receive "80+CLARENCE+..." in our controller.
Thanks,
Evgeny
The text was updated successfully, but these errors were encountered:
I'm thinking of pushing for a change in the pact spec to store the query parameters as a map of arrays. That way they will always be stored unencoded, and it will resolve this issue.
As a work around, I'm going to unencode the query string after loading it from the pact file. The side effect of this is that any query parameter that contains a '+' will be replaced with a space. However, '+' should be used in paths, and %20 in query parameters.
The Ruby impl already talks between the test and the mock server using a map of arrays, it would be very simple to change that to serialise it to the pact that way. I think it's a good idea.
Link to a corresponding google thread
Hi guys,
We are using a ruby-based pact-mock-service on the consumer side to generate a pact file and verifying the contract by using pact-jvm (more specifically the gradle plugin). One of our resources accepts a bunch of query parameters, and the generated contract looks like this:
As you can see the query is encoded on the ruby side, however, apparently the java side expects a decoded value there and we receive "80+CLARENCE+..." in our controller.
Thanks,
Evgeny
The text was updated successfully, but these errors were encountered: