You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is definitely doable, but I want to rethink the API for this crate a bit in the process...
Hopefully the general Faker interface wont need to change (much?), but I really don't like having Helpers in every structure, and it compounds the problem of passing around a seed everywhere. I don't expect this to be hard however.
Let me give some ideas a try and post an update later. Thanks for bringing this crate back to my attention.
Well I've fixed the Helpers bit (aka removed them). But there's still a number of problems... Primarily that the Locale is duplicated in many places. This has nothing to do directly with this issue, however I believe I need to fix this first, since it may influence the API.
Both the locale and RNG seed are cases of the same sort of issue, which is state that needs to be set when Faker is created, and shared to the underlying structures. I think I want to leave the sub-structures (e.g. Address, Name, etc) mostly for organizational purposes, though since using them on their own doesn't make a lot of sense to me, perhaps removing them is a change in the API that should be implemented.
is there a way to provide the generator with a seed, so that, given the same seed, I will always get the same fake data back?
I'm trying to mock an external web server, and I would like to return fake data based on a provided id.
Many thanks for the great lib!
The text was updated successfully, but these errors were encountered: