dnsimple/dnsimple-csharp

Json Payload Not Serializing Correctly For IList<string>

SProfession opened this issue · 0 comments

There is an issue when calling Registrar.ChangeDomainDelegation(long accountId, string domain, IList delegation), The Payload is not being serialized correctly when passing in an IList resulting in a BadRequest Response with the message:
"Parameter servers: must be an array"

I'm currently seeing this issue as well, using your described example, passing in a list causes the Payload to fail with the reason above:
image

Here is the request object serialized:
image

Responses' Request Body:
image

Hi @VanHuychemG, sorry for the delay.

We went thru this and we haven't found a reason about why sending an unserialized body. May I ask if are sending the list of nameservers as in the example below?

var delegation = new List<string>
{
    "ns1.dnsimple.com", "ns2.dnsimple.com", "ns3.dnsimple.com","ns4.dnsimple.com"
};

var newDelegation = client.Registrar.ChangeDomainDelegation(accountId, domainName, delegation);

Originally posted by @SProfession in #35 (comment)