Skip to content
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

generate more realistic looking data for certain schema fields #2

Open
achou11 opened this issue Aug 7, 2023 · 0 comments
Open

generate more realistic looking data for certain schema fields #2

achou11 opened this issue Aug 7, 2023 · 0 comments

Comments

@achou11
Copy link
Member

achou11 commented Aug 7, 2023

there are some cases where we want to - and can - generate more realistic fake data for a schema. JSONSchemaFaker provides a way of doing this by updating the relevant JSONSchema object property definition to specify a faker property, where the associated value is either a valid Faker module or some custom definition that we can implement.

All of the logic for this lives in https://github.com/digidem/mapeo-mock-data/blob/main/lib/faker.js. An example of defining custom generators can be found here:

This is a rather tedious task and we will most likely not be able to cover everything, but we should do our best to cover some of the low-hanging fruit to make consumption feel more realistic.

TODO: update this description with a checklist of fields to update

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant