Skip to Content
1
Jul 25, 2017 at 08:39 AM

Attribute Type of a CanonicalItem

83 Views

Hello everyone,

There is <type> tag under the attribute's <model> tag in CanonicalItem structure. And in the documentation of datahub-metadata-schema.xsd it is explained as

Type of the attribute (for example String)

My question is that can it be any type different from String? I couldn't find any example for this tag other than String (both in tutorials and available DataHub extensions in Hybris). I tried to set one attribute's type as integer (I tried int, Integer, java.lang.Integer values) but it didn't affect the type of attribute. When I call GET method of this CanonicalItem the result was like this:

 <value xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xsi:type="xs:string">137</value>

And it didn't give any error in composition process if I load a String for an integer type attribute. It only gives error in publication process but this error stems from the Hybris since the attribute in Hybris should be integer.

Is this attribute useless? Or is it reserved for future use?

Best regards,