Enable dynamic options for models, and add unit tests.
Review Request #12911 — Created March 23, 2023 and submitted
BaseModelto accept functions in place of values for some
of the new static attributes, and to add missing attributes for
defaultscan now be a hash or a function. In function form, it can
this, since it's being copied to and run off of the prototype
at class construction time.
urlRoothas been added, which was missing before. This can be a string
or a function.
Declarations for instance-level
removed, as they weren't actually needed.
ModelAttributestype has been added and exported, allowing for
easier reference without referencing
Unit tests have been added to test all model construction behavior, with
static attributes or functions.
Unit tests pass.