Smartling / api-sdk-nodejs

3 stars 10 forks source link

Adds the ExtendedSourceFileDto object #78

Closed phinpho closed 1 year ago

phinpho commented 1 year ago

To represent the current response of the getJobFiles endpoint, the object to represent the items has been changed to allow the usage of the following properties:

The property localeIds can also be undefined, because the API docs are currently missing this value, the interface assumes it can be present or not.

phinpho commented 1 year ago

Hi @phinpho,

The property localeIds can also be undefined, because the API docs are currently missing this value, the interface assumes it can be present or not.

Seems like the api reference doc is a bit outdated on that endpoint. I believe response for getJobFiles call should include localeIds in every source file object, I believe it's not necessary to mark it optional (at least tried manually and got this property for every file in the response). But it can be an empty array though.

Other than that PR looks good to me.

So, in case the response for getJobFiles can return the localeIds always, I think it isn't up to me to define that, I'm adding this change based on what I'm seeing on the API response, but because I cannot be sure about the response structure, I believe that Smartling devs should set the property localeIds as not optional for FullSourceFileDto object.

Can you consider adding this change right after this PR?

PavelLoparev commented 1 year ago

Hi @phinpho,

The property localeIds can also be undefined, because the API docs are currently missing this value, the interface assumes it can be present or not.

Seems like the api reference doc is a bit outdated on that endpoint. I believe response for getJobFiles call should include localeIds in every source file object, I believe it's not necessary to mark it optional (at least tried manually and got this property for every file in the response). But it can be an empty array though. Other than that PR looks good to me.

So, in case the response for getJobFiles can return the localeIds always, I think it isn't up to me to define that, I'm adding this change based on what I'm seeing on the API response, but because I cannot be sure about the response structure, I believe that Smartling devs should set the property localeIds as not optional for FullSourceFileDto object.

Can you consider adding this change right after this PR?

Sure. Released 1.5.1