Skip to content
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

Null properties in CreateTemplate response #246

Open
ShawnCholeva opened this issue Oct 24, 2019 · 3 comments
Open

Null properties in CreateTemplate response #246

ShawnCholeva opened this issue Oct 24, 2019 · 3 comments

Comments

@ShawnCholeva
Copy link

ShawnCholeva commented Oct 24, 2019

Hey, I noticed when trying to create a template using the DocuSign.eSign.dll 4.1.1 nuget package that all of the properties on the TemplateSummary response are null like so:

image

I hit the rest endpoint, https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/templates, in docusign via Postman doing a POST request and got back the following response:

{
    "templates": [
        {
            "templateId": "1eb5637f-a553-486f-88ce-c62f184709d7",
            "uri": "/templates/1eb5637f-a553-486f-88ce-c62f184709d7"
        }
    ]
}

I believe that the TemplateSummary properties aren't mapping correctly from the response, do we think this could be true?

@LarryKlugerDS
Copy link
Contributor

Hi @ShawnCholeva ,

Thank you for the bug report. I've investigated it, and I believe that the problem is that the Swagger file produced by our core platform group is incorrectly specifying that the API call returns a TemplateSummary.

But the reality is that an array (of length 1) is being returned. I've filed internal bug EC-1876

At this point, I doubt that we'll change the API. But we should document the result correctly in the Swagger file. Once that's done, the next time the C# SDK is rebuilt, it will be fixed, along with the documentation. (They're both generated from the Swagger file.)

A question for you: in my test, the result was a 1 element array with an object that had templateId, uri, and name attributes. But your POSTMAN test doesn't show the latter. Did you leave it out? Did you test with API v2 or v2.1? (I used v2.1.)

Unfortunately, until the bug is fixed, I can only suggest that you call the API directly without using the SDK. See https://github.com/docusign/eg-03-csharp-auth-code-grant-core/blob/master/eg-03-csharp-auth-code-grant-core/Controllers/Eg010SendBinaryDocsController.cs for an example of how to do this with C#

@ShawnCholeva
Copy link
Author

Hey @LarryKlugerDS ,

That was just a quick test that I ran against 2.1 sending an empty post body to see the response structure. Below is the curl for that request to get that response.

curl -X POST \
  https://demo.docusign.net/restapi/v2.1/accounts/{accountId}/templates \
  -H 'Content-Type: application/json' \
  -H 'X-DocuSign-Authentication: {"Username": "username","Password": "password","IntegratorKey": "key"}' \
  -H 'cache-control: no-cache' \
  -d '{
	
}'

@LarryKlugerDS
Copy link
Contributor

The blocking issue, EC-1876 has been fixed. I've asked for the SDK bug to be scheduled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants