resourceType and resourceDiscriminator
Starting with Collibra version 2024.10 we deprecated the resourceType field that is part of Resource and ResourceReference objects and their accessor methods, in favor of resourceDiscriminator.
Both fields have the same logical value but different data types:
resourceType:Returns an
enumvalue.Returns
BaseDataTypefor traits and any newly added resource types.
resourceDiscriminator:Returns a
stringvalue.Returns
Traitfor traits.
Backward compatibility
The introduction of the resourceDiscriminator field is necessary to ensure backward compatibility while we add new resource types as part of the evolution of the platform. Adding new values to an enum list is not considered backward compatible as it poses challenges to existing integrations that must regenerate their client libraries or fail to recognize the newly added values.
The deprecation of the resourceType field means your current applications continue to work without the need to replace the deprecated field with the new field until you are ready to do so.
How to switch to resourceDiscriminator
As a type indicator
For resources, resourceDiscriminator replaces resourceType in two ways:
For polymorphic resources (such as attributes, which can be
StringAttribute,BooleanAttribute, and so on), the discriminator is provided as a property of the object.For
ResourceReferenceobjects, which specify both an identifier and a type, the discriminator is always provided, replacingresourceType.
In most cases, the discriminator value is the same string as the name of the corresponding ResourceType enum value. For example, if resourceType is Community, the discriminator value is "Community".
As an input argument
When resourceType is required as an argument to a method or as a property of a request body, you can use resourceDiscriminator instead and pass the value as a string.
Last updated
Was this helpful?