Get in touch
Get in touch

Update an existing property on a class

update_property(class_name, prop_name, datatype, description, is_optional, is_array, is_nested, is_lang_string, inverse_of, enums, is_synonym, is_filterable, apply_to_subclasses)

Update an existing property on a class. Only parameters that are explicitly provided (non-``None``) will be changed.
Properties
NameTypeAttributesDefaultDescription
class_namestrClass containing the property.
prop_namestrProperty name to update.
datatypeUnion[DATATYPE, str]<optional>New data type.
descriptionstr<optional>New description.
is_optionalbool<optional>Whether the property is optional.
is_arraybool<optional>Whether the property holds multiple values.
is_nestedbool<optional>Whether an object property is nested.
is_lang_stringbool<optional>Whether the property supports multiple languages.
inverse_ofstr<optional>''Name of the inverse property on the target class.
enumsOptional[list]<optional>Allowed enumeration values.
is_synonymbool<optional>FalseWhether this property is a label synonym.
is_filterablebool<optional>Whether the property is available as a filter.
apply_to_subclassesbool<optional>If True, also updates the property on all existing subclasses.
Returns:
None
Type
None
Raises:
ClassNotFoundError
If the class does not exist.
PropertyNotFoundError
If the property does not exist.