Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.0.0, 1.1.0, 2.0.0, 2.1.0, 2.2.0, 2.3.0
-
None
-
None
Description
It has been observed that Atlas assigns default values to all primitive optional attributes, except for String types, when they are not set in the entity POST payload. This behavior seems incorrect for optional attributes. While it makes sense for non-optional attributes to have default values, it is unclear why optional attributes require default values when not assigned.
As a result, optional attributes of the following types will always be assigned their corresponding default values, which may not be expected in most cases:
- boolean type: false
- number type (e.g., int, long, float, double, etc.): 0
- date type: 0
String type will recevie null when not set, which can be interpeted as not set.
The question is whether we can change this behavior to avoid assigning default values for unset optional attributes, or if there is a specific reason for requiring default values for unset optional attributes.
Thanks.