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
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
class_name | str | Class containing the property. | ||
prop_name | str | Property name to update. | ||
datatype | Union[DATATYPE, str] | <optional> | New data type. | |
description | str | <optional> | New description. | |
is_optional | bool | <optional> | Whether the property is optional. | |
is_array | bool | <optional> | Whether the property holds multiple values. | |
is_nested | bool | <optional> | Whether an object property is nested. | |
is_lang_string | bool | <optional> | Whether the property supports multiple languages. | |
inverse_of | str | <optional> | '' | Name of the inverse property on the target class. |
enums | Optional[list] | <optional> | Allowed enumeration values. | |
is_synonym | bool | <optional> | False | Whether this property is a label synonym. |
is_filterable | bool | <optional> | Whether the property is available as a filter. | |
apply_to_subclasses | bool | <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.