generated from cheqd/.github
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix jsonld errors in didDocument [DEV-4360] (#297)
* fix: Fix jsonld errors in didDocument * fix lint errors * fix unit tests * fix integration tests * make tidy, stick to go 1.21.x * Update lint.yml * Update lint.yml * Revert "make tidy, stick to go 1.21.x" This reverts commit 5abd88b. * Update go.mod * Update lint.yml * Add context only for LinkedDomains * fix unit tests * Rename to LinkedDomainsJSONLD --------- Co-authored-by: Ankur Banerjee <ankurdotb@users.noreply.github.com>
- Loading branch information
1 parent
b516be8
commit eae9120
Showing
20 changed files
with
548 additions
and
564 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
117 changes: 58 additions & 59 deletions
117
tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,61 +1,60 @@ | ||
{ | ||
"@context": "https://w3id.org/did-resolution/v1", | ||
"didResolutionMetadata": { | ||
"contentType": "application/did+ld+json", | ||
"retrieved": "2023-04-12T14:51:09Z", | ||
"did": { | ||
"didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"method": "cheqd" | ||
} | ||
}, | ||
"didDocument": { | ||
"@context": [ | ||
"https://www.w3.org/ns/did/v1", | ||
"https://w3id.org/security/suites/ed25519-2018/v1" | ||
], | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", | ||
"type": "Ed25519VerificationKey2018", | ||
"controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" | ||
} | ||
], | ||
"authentication": [ | ||
"did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" | ||
], | ||
"service": [ | ||
{ | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", | ||
"type": "LinkedDomains", | ||
"serviceEndpoint": [ | ||
"https://bar.example.com" | ||
] | ||
} | ||
] | ||
}, | ||
"didDocumentMetadata": { | ||
"created": "2023-03-06T09:36:55Z", | ||
"updated": "2023-03-06T09:59:22Z", | ||
"deactivated": true, | ||
"versionId": "f790c9b9-4817-4b31-be43-b198e6e18071", | ||
"previousVersionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", | ||
"linkedResourceMetadata": [ | ||
{ | ||
"resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", | ||
"resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", | ||
"resourceName": "TestResource", | ||
"resourceType": "TestType", | ||
"mediaType": "text/plain; charset=utf-8", | ||
"created": "2023-03-06T09:53:44Z", | ||
"checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", | ||
"previousVersionId": null, | ||
"nextVersionId": null, | ||
"resourceVersion": "1.0" | ||
} | ||
] | ||
"@context": "https://w3id.org/did-resolution/v1", | ||
"didResolutionMetadata": { | ||
"contentType": "application/did+ld+json", | ||
"retrieved": "2023-04-12T14:51:09Z", | ||
"did": { | ||
"didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"method": "cheqd" | ||
} | ||
} | ||
}, | ||
"didDocument": { | ||
"@context": [ | ||
"https://www.w3.org/ns/did/v1", | ||
"https://identity.foundation/.well-known/did-configuration/v1", | ||
"https://w3id.org/security/suites/ed25519-2018/v1" | ||
], | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", | ||
"type": "Ed25519VerificationKey2018", | ||
"controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" | ||
} | ||
], | ||
"authentication": [ | ||
"did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" | ||
], | ||
"service": [ | ||
{ | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", | ||
"type": "LinkedDomains", | ||
"serviceEndpoint": ["https://bar.example.com"] | ||
} | ||
] | ||
}, | ||
"didDocumentMetadata": { | ||
"created": "2023-03-06T09:36:55Z", | ||
"updated": "2023-03-06T09:59:22Z", | ||
"deactivated": true, | ||
"versionId": "f790c9b9-4817-4b31-be43-b198e6e18071", | ||
"previousVersionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", | ||
"linkedResourceMetadata": [ | ||
{ | ||
"resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", | ||
"resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", | ||
"resourceName": "TestResource", | ||
"resourceType": "TestType", | ||
"mediaType": "text/plain; charset=utf-8", | ||
"created": "2023-03-06T09:53:44Z", | ||
"checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", | ||
"previousVersionId": null, | ||
"nextVersionId": null, | ||
"resourceVersion": "1.0" | ||
} | ||
] | ||
} | ||
} |
119 changes: 59 additions & 60 deletions
119
tests/integration/rest/testdata/diddoc/diddoc_uuid_testnet_several_versions_between.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,61 @@ | ||
{ | ||
"@context": "https://w3id.org/did-resolution/v1", | ||
"didResolutionMetadata": { | ||
"contentType": "application/did+ld+json", | ||
"retrieved": "2023-04-12T15:00:53Z", | ||
"did": { | ||
"didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"method": "cheqd" | ||
} | ||
}, | ||
"didDocument": { | ||
"@context": [ | ||
"https://www.w3.org/ns/did/v1", | ||
"https://w3id.org/security/suites/ed25519-2018/v1" | ||
], | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", | ||
"type": "Ed25519VerificationKey2018", | ||
"controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" | ||
} | ||
], | ||
"authentication": [ | ||
"did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" | ||
], | ||
"service": [ | ||
{ | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", | ||
"type": "LinkedDomains", | ||
"serviceEndpoint": [ | ||
"https://bar.example.com" | ||
] | ||
} | ||
] | ||
}, | ||
"didDocumentMetadata": { | ||
"created": "2023-03-06T09:36:55Z", | ||
"updated": "2023-03-06T09:39:48Z", | ||
"deactivated": true, | ||
"versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", | ||
"nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", | ||
"previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", | ||
"linkedResourceMetadata": [ | ||
{ | ||
"resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", | ||
"resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", | ||
"resourceName": "TestResource", | ||
"resourceType": "TestType", | ||
"mediaType": "text/plain; charset=utf-8", | ||
"created": "2023-03-06T09:53:44Z", | ||
"checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", | ||
"previousVersionId": null, | ||
"nextVersionId": null, | ||
"resourceVersion": "1.0" | ||
} | ||
] | ||
"@context": "https://w3id.org/did-resolution/v1", | ||
"didResolutionMetadata": { | ||
"contentType": "application/did+ld+json", | ||
"retrieved": "2023-04-12T15:00:53Z", | ||
"did": { | ||
"didString": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"methodSpecificId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"method": "cheqd" | ||
} | ||
} | ||
}, | ||
"didDocument": { | ||
"@context": [ | ||
"https://www.w3.org/ns/did/v1", | ||
"https://identity.foundation/.well-known/did-configuration/v1", | ||
"https://w3id.org/security/suites/ed25519-2018/v1" | ||
], | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"verificationMethod": [ | ||
{ | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1", | ||
"type": "Ed25519VerificationKey2018", | ||
"controller": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"publicKeyBase58": "BpVGbTeT26LipAdk26DBZrmJx2939i9gZS5VxGt1zZQ6" | ||
} | ||
], | ||
"authentication": [ | ||
"did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#key-1" | ||
], | ||
"service": [ | ||
{ | ||
"id": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c#bar", | ||
"type": "LinkedDomains", | ||
"serviceEndpoint": ["https://bar.example.com"] | ||
} | ||
] | ||
}, | ||
"didDocumentMetadata": { | ||
"created": "2023-03-06T09:36:55Z", | ||
"updated": "2023-03-06T09:39:48Z", | ||
"deactivated": true, | ||
"versionId": "ce298b6f-594b-426e-b431-370d6bc5d3ad", | ||
"nextVersionId": "f790c9b9-4817-4b31-be43-b198e6e18071", | ||
"previousVersionId": "0ce23d04-5b67-4ea6-a315-788588e53f4e", | ||
"linkedResourceMetadata": [ | ||
{ | ||
"resourceURI": "did:cheqd:testnet:b5d70adf-31ca-4662-aa10-d3a54cd8f06c/resources/5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", | ||
"resourceCollectionId": "b5d70adf-31ca-4662-aa10-d3a54cd8f06c", | ||
"resourceId": "5e16a3f9-7c6e-4b6b-8e28-20f56780ee25", | ||
"resourceName": "TestResource", | ||
"resourceType": "TestType", | ||
"mediaType": "text/plain; charset=utf-8", | ||
"created": "2023-03-06T09:53:44Z", | ||
"checksum": "64ec88ca00b268e5ba1a35678a1b5316d212f4f366b2477232534a8aeca37f3c", | ||
"previousVersionId": null, | ||
"nextVersionId": null, | ||
"resourceVersion": "1.0" | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.