[BUG] ConnectedAssetUniverse not gathering all asset properties #7505
Labels
bug
Something isn't working
no-issue-activity
Issues automatically marked as stale because they have not had recent activity.
triage
New bug/issue which needs checking & assigning
Existing/related issue?
No response
Current Behavior
Inside the context of a Java application, I want to use the
ConnectedAssetUniverse
class from the ocf-metadata-client to retrieve the properties of an asset using its GUID.After creating a
ConnectedAssetUniverse
object using an asset's GUID, the resulting object contains null values for fields that are otherwise present in the AssetResponse retrieved from the OMAS.Some of the missing attributes which are found inside the
AssetResponse
but not inside theConnectedAssetUniverse
object after processing are:The
ConnectedAssetUniverse
is supposed to gather theSchemaAttributes
of aSchemaType
(if present), which are also missing, along with the base attributes of the Asset class (and some attributes higher in the hierarchy).Expected Behavior
The object should contain the same attributes that are returned when calling the assetUniverse API through a tool such as Postman, as well as some extra attributes specific to the functionality of the client (i.e. SchemaAttributes).
Steps To Reproduce
Creating the asset
The asset was created following these steps:
(/access-services/asset-manager/users/{{user-id}}/data-assets)
(/access-services/asset-manager/users/{{user-id}}/schema-types)
(/access-services/asset-manager/users/{{user-id}}/parents/{{asset-id}}/CSVFile/schema-types/{{schema-id}})
(access-services/asset-manager/users/{{user-id}}/schema-elements/{{schema-id}}/schema-attributes)
Reproducing the issue
Use the ConnectedAssetUniverse object found inside the ocf-metadata-client package to retrieve the asset in the context of an application. The resulting object should have unexpected null values such as
guid
,qualifiedName
,schemaAttributes
(field of theschema
property) etc.Environment
Any Further Information?
Possible explanations
1. Missing base Asset properties
From what I have managed to figure out from the logic behind the
AssetResponse
processing, the base properties seem to be missing due to simply not being assigned to the newly createdConnectedAssetUniverse
object. The whole logic behind the assignment of fields from the response seems to take place inside theprocessAssetResponse
function, which appears to not assign most of them.2. Missing SchemaAttributes
This issues appears to be related to the
attributesCount
field found inside theAssetResponse
response, which is always set to 0. This has the effect of not triggering the creation of aConnectedSchemaAttributes
object that seems to be responsible with an API call used to gather the attributes of the asset's schema type.The text was updated successfully, but these errors were encountered: