metadatacenter / cedar-embeddable-editor

CEDAR Embeddable Editor WebComponent
Other
4 stars 3 forks source link

When creating instances the CEE is not putting @id fields in nested element instances #85

Closed martinjoconnor closed 10 months ago

martinjoconnor commented 11 months ago

The model JSON Schema for elements is demanding that element instances have @id fields. Values can be null (indicating that the server will fill in the value).

At present, the CEE is not generating these @id fields in nested element instances so validation is failing if we take the raw output of the CEE before a save to CEDAR.

We need to change the code so that when an element instance is created it contains an @id field with a null value.

martinjoconnor commented 11 months ago

For example, here is a nested element instance inside an array with a missing @id:

screenshot_2023-12-04_at_10 59 06___am

muakdogan commented 10 months ago

Model is not validating with null values. So a random UUID is generated as a workaround for now. It will be good to address this issue in the next model change. Closing this with PR #88