-
Notifications
You must be signed in to change notification settings - Fork 89
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
Add a new module supports datafaker #525
Comments
I believe java-faker is no longer maintained. There is an actively maintained forked at https://github.com/datafaker-net/datafaker @bodiam - maybe somebody from the Data Faker team can help with the integration? |
Hi there! This library looks interesting, and happy to share some ideas on this. Is there some api or idea you had in mind? |
@bodiam Thank you for your help too, @armandino |
@seongahjo no worries. Happy to connect two great libraries. |
@bodiam Is there any way to make a random value which satisfies condition? It would be helpful with this feature. |
@seongahjo given the nature of the fake values, that would be hard. For example, how would we create a country of 30 characters long? We don't really know the limits even, since they are depending on the Locales. Yes, it's possible to generate a random string of X characters, but that defeats the purpose of the library. Can I ask why you'd need such a feature? |
@bodiam If a String field has a For example. class Foo{
@Size(3)
String Bar;
} A length of We'd like to use datafaker to generate a feasible String field value inferred by a property name or other condition. |
It's tricky I think. Some of these fields are populated by regular expressions, or concatenations of different fields. This might be a silly idea, but how about invoking the faker, potentially several times (100s of times shouldn't be an issue), and record the shortest/longest lengths? DaraFaker cannot, and will never be able to generate a string of arbitrary length for any propery. For example, a license plate of 25 characters wouldn't make sense, or a full name of 2 characters. |
Describe the feature you request
Add a new module supports datafaker
The text was updated successfully, but these errors were encountered: