Closed FodT closed 6 years ago
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.
with #130, we might be able to introduce a delete_field(fieldname)
which bypasses the validation checks. Thoughts?
del Entity.field
to post a blank value on Entity.save()
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?