Need declarative way to specify programmatically-generated default property values #27
Open
Description
In an onm namespace data model declaration you can currently specify either, a static default value for a property, or programmatically-generate a default value via a callback function. The later case is used in cases like assigning a UUID, or timestamp to a data namespace at construction-time.
It's inconvenient to have to clutter onmd-* modules with additional npm dependencies (e.g. to call node-uuid or onm-bundled util functions). Better to extend the namespace declaration grammar to allow common things like UUID's/timestamps to be declared.
e.g.
{
namespaceType: 'component',
jsontTag: 'example',
namespaceProperties: {
userImmutable: {
componentUuid: {
generatedDefault: "uuid"
}
}
}