Rename the empty DataContainer type as undefined.
DataContainer no longer needs to support an 'empty' data_type, because each primitive now correctly supports null and casting between null values.
Now that each primitive handles a state of NULL
, in theory we do not need the empty
data_type.
However, we need to keep the empty data_type
, because otherwise null or empty values are automatically cast to a default type, like text
. This will cause unexpected behaviour and force developers to also allow the default data_type
. for instance:
An input to a processor allows only
JSON
, but also allows 0 inputs (seeApplicationCreate
and itsopenapi
input, which requiresdata_type
ofjson
and cardinality0,1
).If
empty
is deprecated, a defaultdata_type
is cast (i.e.data_type
default forNULL
istext
) and this forcesApplicationCreate openapi
input to also allowdata_type
oftext
.This is semantically incorrect and can lead to invalid parsing and validation of inputs.
Instead, we should rename empty
to undefined
, so that it makes semantic sense.