-
Notifications
You must be signed in to change notification settings - Fork 160
feat: add did document support for alsoKnownAs #3277
feat: add did document support for alsoKnownAs #3277
Conversation
ebf8825
to
7994f86
Compare
@@ -1395,6 +1400,16 @@ func populateRawServices(services []Service, didID, baseURI string) []map[string | |||
return rawServices | |||
} | |||
|
|||
func populateRawAlsoKnownAs(aka []string) []interface{} { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add unit tests to validate aka value as per schema
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggest you cover a few different IRI formats, such as:
did:example:123
, https://social.example/username
, urn:uuid:1231
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Baha-sk Unit tests added to doc_test.go
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm, added minor comment
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"format": "uri" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
careful with the uri
format.... test cases need to exist to cover this... make sure you are covering all of:
Codecov Report
@@ Coverage Diff @@
## main #3277 +/- ##
=======================================
Coverage 88.28% 88.28%
=======================================
Files 315 315
Lines 42658 42668 +10
=======================================
+ Hits 37659 37669 +10
Misses 3674 3674
Partials 1325 1325
Continue to review full report at Codecov.
|
Signed-off-by: Chris Abernethy <[email protected]>
7994f86
to
6f14536
Compare
Signed-off-by: Chris Abernethy [email protected]
Title:
Add
alsoKnownAs
support to DID documentDescription:
Implement support for
alsoKnownAs
DID document element as described in DID Core v1Summary:
Add
AlsoKnownAs
element todid.Doc
and populate value indid.ParseDocument()
Add
AlsoKnownAs
element todid.rawDoc
and populate value indid.Doc.JSONBytes()
Add
did.populateRawAlsoKnownAs()
helper function to convertalsoKnownAs
from[]string
to[]interface{}
Add
alsoKnownAs
to schemas used for DID Schema Validation