forge-api-dotnet-client
forge-api-dotnet-client copied to clipboard
Autodesk.CloudPlatform.PropertyDatabase missing in ManifestChildren.RoleEnum
I usually call DynamicJsonResponse.ToObject<T>() on api responses.
For DerivativeApi.GetManifest there is a problem: During translating an SVF calling GetManifestAsync() with status InProgress everything is fine. But when status is Success, i get a child with role Autodesk.Cloudplatform.PropertyDatabase (see screenshot), which leads to JsonSerializationException.
ManifestChildren.RoleEnum is missing the role.
I am translating a zipped Inventor assembly to SVF:
public async Task<Job> MyTranslateAsync(ObjectDetails objectDetails, string rootFilename)
{
var input = new JobPayloadInput(objectDetails.ObjectId.ToBase64());
if (objectDetails.ObjectId.EndsWith(".zip"))
{
input.CompressedUrn = true;
input.RootFilename = rootFilename;
}
var output = new JobPayloadOutput(new List<JobPayloadItem>
{
new JobPayloadItem(JobPayloadItem.TypeEnum.Svf, new List<JobPayloadItem.ViewsEnum>
{
JobPayloadItem.ViewsEnum._2d,
JobPayloadItem.ViewsEnum._3d
})
})
{
Destination = new JobPayloadDestination(JobPayloadDestination.RegionEnum.EMEA)
};
var job = new JobPayload(input, output);
DynamicJsonResponse response = await _derivativesApi.TranslateAsync(job, true);
return response.ToObject<Job>();
}
public async Task<Manifest> MyGetManifestAsync(string urn)
{
DynamicJsonResponse response = await _derivativesApi.GetManifestAsync(urn);
return response.ToObject<Manifest>();
}
