-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
breaking changeIntroduce a needed breaking changeIntroduce a needed breaking changeenhancementNew feature or requestNew feature or requesthigh energyRepresents a task which need a lot of energyRepresents a task which need a lot of energy
Milestone
Description
Similar and prior to #7 , it may be useful to enable the usage of complex types on a schema:
// To save a resource of this shape
const data = {
id: 'someid',
profile: {
firstName: 'john',
lastName: 'doe',
},
};
// With a schema like this
const schema = {
id: is.key(),
profile: is.object({
firstName: is.string('...'),
lastName: is.string('...'),
}),
}Complex types are embedded in the enclosing schema and does not need a separate repository, this is purely for convenience to avoid a big flat structure and the representation in the triple will still be standard.
This feature will introduce a needed breaking change, the Schema.type should be moved to the Repository (and the type becomes mandatory in the repository options), I think it makes more sense after all, only the repository cares about a Thing type after all, the schema is here only to map JS <-> Thing
Metadata
Metadata
Assignees
Labels
breaking changeIntroduce a needed breaking changeIntroduce a needed breaking changeenhancementNew feature or requestNew feature or requesthigh energyRepresents a task which need a lot of energyRepresents a task which need a lot of energy