-
Notifications
You must be signed in to change notification settings - Fork 234
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
Pact request body with inner object gives internal server error in Pact Net #494
Comments
I don't believe you can just pass objects to the DSL arbitrarily, unless they have an implicit conversion to a JSON type. The input to the interaction needs to map to the payload that will actually be sent over the wire. NOTE: you can use the code gates (```) to better format your code and aid with readability. I have updated your question to do that now. |
Thanks for reply. In java, we have PactDslJsonBody which I believe is extension to DslBody in which we can pass arrays or objects like this - can be used as I am looking for .NET version for PactDslJsonBody |
Adding to above, I am using .NET framework 4.6.2, don't have liberty to upgrade to latest version for .NET framework or .NET Core. I may upgrade PactNet if it will resolve above error. |
This is using PactNet 3.x or below, which are deprecated versions. Please update to PactNet 4.x. |
See also the docs for the 3.x.x line (including working examples) here: https://github.com/pact-foundation/pact-net/tree/3.0.2 |
Thanks for reply. I understand upgrading the version but my project uses .NET framework 4.6.1 and I believe the latest PactNet version doesn't support this .NET framework. |
The text was updated successfully, but these errors were encountered: