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

unwrapping doesn't work as expected #65

Closed
jonnycrunch opened this issue Oct 22, 2020 · 4 comments · Fixed by #66
Closed

unwrapping doesn't work as expected #65

jonnycrunch opened this issue Oct 22, 2020 · 4 comments · Fixed by #66
Labels
bug Something isn't working not yet implemented

Comments

@jonnycrunch
Copy link

I'm getting conflicting results of 'valid' cddl from the gem implementation of cddl and this one. The following example fails to validate using your rust CDDL tool but does using the gem tool. The following CDDL is used to validate a JSON-LD document where the value of the @context is either a sting or an array of items where the first item as stated below followed by one or more URIs. My understanding was the ~ is used to unwrap the type and remove the necessary CBOR tag (32).

document = {
  @context : "https://www.example.com/ns/v1" / [ "https://www.example.com/ns/v1", 1* ~uri ]
}

Thoughts? Thanks!

@anweiss anweiss added the bug Something isn't working label Oct 22, 2020
@anweiss
Copy link
Owner

anweiss commented Oct 22, 2020

Thanks for reporting @jonnycrunch. This is actually not yet implemented :) Will clarify this in the README and get this implemented.

@anweiss
Copy link
Owner

anweiss commented Oct 26, 2020

Hey @jonnycrunch, would you be able to share links to the complete CDDL and sample JSON-LD document you're attempting to validate? Thanks!

@jonnycrunch
Copy link
Author

@anweiss sure. I am working on the Decentralized Identifiers spec here. All examples are here. Any help validating my approach with CDDL is welcome! Thanks!

@anweiss
Copy link
Owner

anweiss commented Oct 26, 2020

Oh awesome! I've actually happen to have taken a keen interest in DID and SSIs as of late so this is perfect! Will review and get some tests going based on these examples.

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

Successfully merging a pull request may close this issue.

2 participants