-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: generate dummy documents for a collection based on aldeed's SimpleSchema #6
Comments
Great idea, thanks! |
No problem! great work btw. |
Haha, I just came here to make this very suggestion! I had some additional ideas about it, concerning field names... If a field key contains:
If the field is a string without min or max values, generate a string of length between In the Fake.docs function, take a second argument: An options object which would use the following fields:
I can't wait to have such a feature! |
+1 on this , that would be very cool |
+1 |
1 similar comment
+1 |
The big problem here is dealing with regular expressions in an adequetly random fashion |
I did some initial research today to find out whether this feature is viable. I couldn't find any information on retrieving a list of keys and their types from the doc of simpleschema. But It is possible to find a list of keys from a simpleSchema object: they are stored in an array named If anyone else has looked into it, please share your thoughts and comments on this. Thanks. |
I've added (limited) support for generating dummy documents according to a given SimpleSchema definition. Have a look at my pull request here: #20 Only Number, String and Boolean types are supported for the time being. Arrays will be added soon. |
You would use it like this :
Fake.docs(SimpleSchema);
Would spit out a document based on the SimpleSchema object. That would be freakin awesome! 👍
The text was updated successfully, but these errors were encountered: