This feature mostly already exists in v0.4.4. This issue is for tracking progress for this feature in the TypeScript rewrite of this package.
Tests to confirm this feature should be:
Golden Path Tests
[ ] An Embedded Document should successfully create data per the Embedded Document's structure, where all data provided to create the document and its embedded documents are valid.
[ ] An Embedded Document should successfully create data per the Embedded Document's structure, where any field that was not provided a value but has a default rule should create with the default data.
[ ] An Embedded Document should successfully create data per the Embedded Document's structure, where a field that has a type of another Document should store only the Document ID in its database entry.
[ ] An Embedded Document that inherits from another Embedded Document-based class should adhere to all fields/rules/constraints/etc defined in the parent class.
[ ] An Embedded Document that inherits from another Embedded Document-based class should be able to override all fields/rules/constraints/etc defined in the parent class.
Error-Handling Tests
[ ] An Embedded Document should throw an error when creating data where the Embedded Document fields are not meeting their defined required constraint.
[ ] An Embedded Document should throw an error when creating data where the Embedded Document fields are not meeting their defined unique constraint.
[ ] An Embedded Document should throw an error when creating data where the Embedded Document fields are not meeting their defined type constraint.
[ ] An Embedded Document should throw an error when creating data where the Embedded Document fields are not meeting their defined min constraint.
[ ] An Embedded Document should throw an error when creating data where the Embedded Document fields are not meeting their defined max constraint.
[ ] An Embedded Document should throw an error when creating data where the Embedded Document fields are not meeting their defined choices constraint.
[ ] An Embedded Document should throw an error when creating data where the Embedded Document fields are not meeting their defined validate constraint.
Not sure that this is needed, given that all EmbeddedDocument and Document functionality both stem from BaseDocument - and the Document tests are passing perfectly fine.
This feature mostly already exists in v0.4.4. This issue is for tracking progress for this feature in the TypeScript rewrite of this package.
Tests to confirm this feature should be:
Golden Path Tests
Error-Handling Tests