anatine / zod-plugins

Plugins and utilities for Zod
591 stars 84 forks source link

Consider using @ngneat/falso #160

Open czlowiek488 opened 10 months ago

czlowiek488 commented 10 months ago

Falso is currently more refined version of faker. e.g. there are no limitiation for generating uniqe uuid. What do you think about switching mocking library? https://github.com/ngneat/falso

Brian-McBride commented 10 months ago

If you look at the source; packages/zod-mock/src/lib/zod-mock.ts

It is just a huge lookup. Part of what works with "Faker" is the names of the functions matching up with common key names.

I would say maybe a feature would be to expand the lib so that it can take in different "mapping" to support any number of random gen libs. That way you could choose which one to use.

czlowiek488 commented 9 months ago

Honestly I don't mind faker, however generating unique uuid is broken and after some generations uuids will be repeated.