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
I've been trying to create a contract with enum values, I get number but I want the string value as my provider returns strings. How can I make sure the contract will contain "gender" : "Male" instead of "gender": 0? Below is a simplified example, however the class I'm using has many many enums.
And this is my consumer contract code (simplified snippet):
varperson=newPerson(){Gender=Gender.Male,};this.pact.UponReceiving("a for a person").Given("a person exists in database").WithRequest(HttpMethod.Get,$"/person").WillRespond().WithStatus(HttpStatusCode.OK).WithJsonBody(Match.Type(person);
Hi guys, love the tool but can use some help.
I've been trying to create a contract with enum values, I get number but I want the string value as my provider returns strings. How can I make sure the contract will contain "gender" : "Male" instead of "gender": 0? Below is a simplified example, however the class I'm using has many many enums.
using IPactBuilderV4;
Let's say I have this object:
And this is my consumer contract code (simplified snippet):
I get this contract (snippet)
The text was updated successfully, but these errors were encountered: