Object generation does not work
Closed this issue · 3 comments
In the sample config.json file there are two keys for object:
"object": {
"type": "object",
"objectContent": {
"k1": {
"type": "string",
"unique": true,
"minLength": 4,
"maxLength": 4
},
"k2":{
"type": "int",
"minInt": -10,
"maxInt": -5
}
}
}
However, when data is generated using mgodatagen it produces object as:
"object" : {
"object" : "aaaa"
}
The second key is not generated. Also, is there any way to name keys in object? For example, in above example the is key is named as object
but it's not specified on object content.
Please help.
Hi @15astro
Thanks for reporting this, this was a bug introduced in a previous commit. It should now work as intended!
How can I get the binaries with these new updates here? release page
How about adding build steps here when you have the source code.
Thanks
A new release with the fix is available here: v 0.4.1 !
If you want to build the code from source, you need to install go first, and then either use
go get -u github.com/feliixx/mgodatagen
or
git clone https://github.com/feliixx/mgodatagen.git
cd mgodatagen
go get -t -v ./...
go build
This will create a binary called mgodatagen
that you can use from command line