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

Investigate: Capitalized field names don't work on plural types #45

Open
stevenvegt opened this issue Feb 2, 2022 · 1 comment
Open
Labels
bug Something isn't working

Comments

@stevenvegt
Copy link
Member

Using capitalized vc fields:

{
    "Issuer": "did:nuts:5gNNR65QygExKDaVFauTbSJmBWQBzsJwFFDPuCmdqUX9",
    "Type": [
        "NutsAuthorizationCredential"
    ],
    "CredentialSubject": {
        "Id": "did:nuts:42xhysHJgYFzrpChfRVAMZzeT8AZrYH51wvJJSqP5A8c",
        "LegalBase": {
            "ConsentType": "implied"
        },
        "Resources": [
            {
                "Path": "/Composition/061ee268-4a29-4ab1-96b5-94d293400b7a",
                "Operations": [
                    "read",
                    "document"
                ],
                "UserContext": true
            }
        ],
        "PurposeOfUse": "eOverdracht-sender"
    }
}

Gives a Unmarshal error:

Unmarshal type error: expected=[]interface {}, got=object, field=credentialSubject, offset=22
@stevenvegt stevenvegt added the bug Something isn't working label Feb 2, 2022
@desAweis
Copy link

Hello,

may I know how to generate a VC like yours using this repository, since there are no functions like CreateIssuer() or CreateCredentialSubject()?

Thanks!
Best

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants