Closed faboulaws closed 5 years ago
Hi, You can use simply 1:
const articleSchema = {
title: {
chance: 'word'
},
seo: {
title: {
chance: 'word'
},
description: {
chance: 'word'
}
}
};
mocker().schema('article',articleSchema, 1)
You can test here the result, also you can use 2 entities if you need to share between more schemas. Thanks for using mocker-data-generator!
Thanks for the quick response :-)
There is no example of nested attributes. For example, if I want to create a mock an entity with the structure below
I need to create 2 entities
Am I missing something or this is the best way to generate nested properties.