Closed WesTyler closed 7 years ago
I'm torn about this feature. Would it not be the same if not more flexible to allow the end user to do this themselves outside the scope of Felicity. What type of regulations needs to be imposed around this? In your example, if the id
is not provided, should commonPerson
still be added since it does not comply with the defined schema?
Seems like a lot to do when the user can just write something like this.
const random = Pairing.example();
const random.people['adc7d80c'] = {
id: 'adc7d80c-f78c-44f1-94c6-73e816f5aa84',
tags: ['admin']
} ;
My plan was to follow a similar process to entityFor
with input. In the case of data that does not comply with the defined schema, it will not be added.
I do hear you though. I'll leave this open for discussion, but it may end up not being worth building into the Felicity source.
I think you're right. Rules for partial inclusion of data started getting hairy pretty quickly as I was putting together a spike for this.
I'm going to close it out and revisit only if users in the future start requesting this functionality.
What are you trying to achieve or the steps to reproduce ?
Allow
.example
methods to accept an input parameter. Valid input will be used instead of randomly-generated data.