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
Steps to reproduce:
Sent a get request to endpoint: Method:GET Path:/shipping/v1 Headers: { "Accept": "application/json", "site": "US", "Content-Type": "application/json" }
That returning response body with '/' symbols, for example: { "data": [ { "relationships": { "user/shippingAddress": { "data": { "id": "123", "type": "user/shipping-address" } } } } ] }
Actual:
At Pact you will see exception: Request to provider failed with an exception: "/" is not allowed in an identifier in path expression "$.data[0].relationships.user/shippingAddress.data.id" at index 28 (au.com.dius.pact.core.model.InvalidPathExpression)
Expected:
Test should be passed successfully, since it's already implemented on service end to return such response and consumers expected that.
The text was updated successfully, but these errors were encountered:
I am not able to replicate this issue with Pact-JVM. See example tests: Consumer and Provider
I did notice that the pact file generated from that consumer test (see pact) has the slash escaped $.data[*].relationships['user/shippingAddress'].data.id, while the error you provided has $.data[0].relationships.user/shippingAddress.data.id which is not valid.
How have you generated the Pact file that was used in your test?
Hey!
Steps to reproduce:
Sent a get request to endpoint:
Method:GET Path:/shipping/v1 Headers: { "Accept": "application/json", "site": "US", "Content-Type": "application/json" }
That returning response body with '/' symbols, for example:
{ "data": [ { "relationships": { "user/shippingAddress": { "data": { "id": "123", "type": "user/shipping-address" } } } } ] }
Actual:
At Pact you will see exception:
Request to provider failed with an exception: "/" is not allowed in an identifier in path expression "$.data[0].relationships.user/shippingAddress.data.id" at index 28 (au.com.dius.pact.core.model.InvalidPathExpression)
Expected:
Test should be passed successfully, since it's already implemented on service end to return such response and consumers expected that.
The text was updated successfully, but these errors were encountered: