Trouble with new JSON forma with CLI 2.0
Hi,
I have upgraded 1password CLI to 2.0 and I am working on the update of my helpers scripts: https://github.com/mickaelperrin/onepassword-tools
I try to create a new login entry with the following JSON stored in a temporaray file (/var/folders/t0/4z0_cwt538d4qkkvnpb81_6m0000gn/T/tmp_yv7ifot)
debug: {
debug: "sections": [
debug: {
debug: "title": "",
debug: "name": "Section_jlcceacsdqaeeqyzxveurjevhqvhr"
debug: }
debug: ],
debug: "fields": [
debug: {
debug: "id": "notesPlain",
debug: "type": "STRING",
debug: "purpose": "NOTES",
debug: "label": "notesPlain"
debug: },
debug: {
debug: "value": "mickaelperrin",
debug: "id": "username",
debug: "purpose": "USERNAME",
debug: "label": "username"
debug: },
debug: {
debug: "value": "EMerxisXs3r9I.PHLtH0kdd+B",
debug: "id": "password",
debug: "type": "CONCEALED",
debug: "purpose": "PASSWORD",
debug: "label": "password"
debug: },
debug: {
debug: "id": "notesPlain",
debug: "type": "STRING",
debug: "purpose": "NOTES",
debug: "label": "notesPlain"
debug: },
debug: {
debug: "label": "UUID",
debug: "value": "22cd2b81-7c5b-4fa2-99c9-bcdb818656bf",
debug: "type": "STRING",
debug: "id": "nertivikkjodthpyolqtqzxwdc",
debug: "section": {
debug: "title": "",
debug: "name": "Section_jlcceacsdqaeeqyzxveurjevhqvhr"
debug: }
debug: }
debug: ]
debug: }
and running the following command
op item create --category "Login" --template /var/folders/t0/4z0_cwt538d4qkkvnpb81_6m0000gn/T/tmp_yv7ifot --title="ACCOUNT mickaelperrin ON https://test.fr"; --url="https://test.fr" --account=my
I got the following error:
[ERROR] 2022/03/30 20:11:25 too many "username" fields in Apply(): You can only use one "username" field.
I don't know what's going wrong. Any help is appreciated.
Thanks,
1Password Version: 7.9.3
Extension Version: 2.0.0
OS Version: 12.3
