How to create an Address field type using the CLI?
I'm using the CLI to create an Identity item. The default Identity template has an example "ADDRESS" type, but fails to create an address with any value other than an empty string. I want to create the default address type not a STRING field.
Template Example Field Type:
{
"id": "address",
"section": {
"id": "address",
"label": "Address"
},
"type": "ADDRESS",
"label": "address",
"value": ""
}JSON Copied from Identity Item:
{
"name": "address",
"title": "Address",
"fields": [
{
"k": "address",
"n": "address",
"t": "address",
"v": {
"city": "New York City",
"country": "us",
"state": "New York",
"street": "123 4th Street",
"zip": "12345"
}
}
]
}The error when you pass in a non-empty string is:
'[ERROR] validateVaultItem failed to Validate: Couldn't validate the item: "[ItemValidator] has found 1 errors, 0 warnings: \\nErrors:{1. details.sections[1].fields[0].v has invalid type: \\"string\\". Requires one of [object] value}"\n'
The error when you pass in an object is:
'[ERROR] invalid JSON template: json: cannot unmarshal object into Go struct field ItemField.fields.value of type string\n'
How do you create an address if not a string or an object?
