From 28c80a99a6131691d9b8ad790eb0792d1b62abac Mon Sep 17 00:00:00 2001 From: Stas Dmytryshyn Date: Mon, 2 Dec 2024 19:36:47 +0100 Subject: [PATCH] fix: vc-model-v2 test suite (#1811) * fix: vc-model-v2 test suite * fix: lint --- pkg/restapi/v1/issuer/controller.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkg/restapi/v1/issuer/controller.go b/pkg/restapi/v1/issuer/controller.go index e61922ef2..4a5d267dc 100644 --- a/pkg/restapi/v1/issuer/controller.go +++ b/pkg/restapi/v1/issuer/controller.go @@ -330,11 +330,12 @@ func (c *Controller) issueCredential( return nil, err } - issuer := credentialParsed.Contents().Issuer - if issuer != nil && !strings.HasPrefix(issuer.ID, "did:") { - return nil, resterr.NewValidationError(resterr.InvalidValue, "credential.issuer", - errors.New("issuer must be a DID")) - } + // not sure why we need this, but this breaks vc-data-model-2.0-test-suite + // issuer := credentialParsed.Contents().Issuer + // if issuer != nil && !strings.HasPrefix(issuer.ID, "did:") { + // return nil, resterr.NewValidationError(resterr.InvalidValue, "credential.issuer", + // errors.New("issuer must be a DID")) + //} // maybe implement some better handling https://www.w3.org/TR/vc-data-model-2.0/#dfn-url if strings.Contains(credentialParsed.Contents().ID, " ") {