Whenever an object is created, expand that patch to also (recursively) fill in default values. Uses a JSON schema to decide what values to fill in.
This WIP has the basic logic done so far, needs more cleanup
Rough todo list:
[x] create / pass basic tests
[x] change rest of cloudina to use the new default logic
[ ] clean up code (especially typescript assertions / casts)
[x] consider what to do about cases where the json schema doesn't define a default value -- do we fallback or just not fill it in? (i think the latter)
auto-generating schemas:
In the arthropod context we always have a json schema. But in other cloudina contexts (eg our github demo from the other day), the user might not have a schema readily available. In these cases we can try auto-gen from the doc?
Whenever an object is created, expand that patch to also (recursively) fill in default values. Uses a JSON schema to decide what values to fill in.
This WIP has the basic logic done so far, needs more cleanup
Rough todo list:
auto-generating schemas:
In the arthropod context we always have a json schema. But in other cloudina contexts (eg our github demo from the other day), the user might not have a schema readily available. In these cases we can try auto-gen from the doc?