-
Notifications
You must be signed in to change notification settings - Fork 87
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
Update ServiceEndpoint
to support sets and maps
#485
Merged
Merged
Conversation
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
cycraig
added
Enhancement
New feature or improvement to an existing feature
Breaking change
A change to the API that requires a major release. Part of "Changed" section in changelog
labels
Nov 5, 2021
olivereanderson
approved these changes
Nov 8, 2021
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.
Good work. Appreciate the new tests to the changed/new functionality.
HenriqueNogara
approved these changes
Nov 9, 2021
cycraig
changed the title
Add ServiceEndpoint sets and maps
Update Dec 15, 2021
ServiceEndpoint
to support sets and maps
cycraig
added
Rust
Related to the core Rust code. Becomes part of the Rust changelog.
Wasm
Related to Wasm bindings. Becomes part of the Wasm changelog
labels
Dec 15, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Breaking change
A change to the API that requires a major release. Part of "Changed" section in changelog
Enhancement
New feature or improvement to an existing feature
Rust
Related to the core Rust code. Becomes part of the Rust changelog.
Wasm
Related to Wasm bindings. Becomes part of the Wasm changelog
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of change
Update the
serviceEndpoint
field ofService
to allow an ordered set or map as well as the current single URL. Note that "ordered" refers to maintaining the order of insertion, not comparison.This is in line with the DID specification: https://www.w3.org/TR/did-core/#dfn-serviceendpoint
One thing to note is that this PR allows empty sets and maps while the spec specifies "one or more". This is mostly due to ergonomics to avoid clunky wrapping types but can be changed if necessary.
Also according to the spec, we should allow nested maps in
serviceEndpoint
sets and maps too. Considering that would complicate the Rust types and usability quite a bit, it was decided not to support nested maps at this time.Links to any relevant issues
Resolves issue #447.
Type of change
Add an
x
to the boxes that are relevant to your changes.How the change has been tested
Describe the tests that you ran to verify your changes.
Make sure to provide instructions for the maintainer as well as any relevant configurations.
Change checklist
Add an
x
to the boxes that are relevant to your changes.