Support for deleting fields from entities
FodT opened this issue · 4 comments
It is not currently possible to remove numerical (and likely other) fields from entities and then save that change.
The API expects a blank key/value pair when removing an optional field which has previously been set - setting a numerical field to None fails validation.
Could implement a .removeField() entity function?
How does JSON Schema/t1-node handle this? If you want to remove a concept ID, do you just set it to null? Is that possible there without additional work?
That's a good catch. setting numerical fields to null
will cause a jsonschema validation exception to be thrown, so we need to think about this there, too. I suspect the easiest thing would be to declare all fields as {"type": [actual_type, "null"]}
, which jsonschema allows.