Factory doesn't generate empty entities
Factory class advertises an option to generate empty entity instead of a "sample", however the option has no effect
Bug Report 🐛
As it's being used by the CLI generate command here, and being passed onto the factory class here, there should be an option to generate empty objects as advertised here.
But that option is simply being ignored.
Expected Behavior
That the factory returns an entity with empty values
Current Behavior
Returns sampled data as values
Possible Solution
Steps to Reproduce
- Use the setup outlined in the CLI command.
- Inspect the JSON document
Context (Environment)
Desktop
- OS: macOS
- Browser: Chrome & Node
Detailed Description
Possible Implementation
@ekarademir do the String properties in your model have min/max length validators?
We made the decision when adding those that the output of the value generators should always be a valid instance. This forces us to generate some sample data even when using the empty mode.
I think that there's scope to improve the logic here, for example:
- Generate only using spaces,
when inemptymode - Always use the min length when specified in
emptymode