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

@type is not an URI test does not fail when using JSON-LD processor #27

Open
filip26 opened this issue Jul 29, 2023 · 2 comments
Open
Assignees

Comments

@filip26
Copy link

filip26 commented Jul 29, 2023

Please note that this test input/credential-type-mapped-nonurl-fail.json does not fail when the input is given directly to a JSON-LD processor. The tot-a-url#ExampleTestCredential is treated as a relative URI and gets expanded.

See the expanded input

@filip26
Copy link
Author

filip26 commented Jul 29, 2023

the same for input/credential-type-unmapped-fail.json

@aljones15
Copy link
Collaborator

aljones15 commented Aug 2, 2023

Thanks for this. I looked into it and finding strings it doesn't turn into relative urls is an issue. "ftp://bluesberries" is turned into a relative URL as is an empty string "". The later, an empty string, is not a url to my knowledge so this could be a json-ld issue. To further add the issues with this test case, the @vocab in the vc2.0 context will often result in a valid type.

Ok found an invalid url: "http ://foo.org" so I will update with that shortly.

I do feel json-ld based processor needs to not consider an empty string a valid url. I might add that ftp is a valid url, but is treated as a relative url amongst other oddities.

@davidlehn any thoughts here? @filip26 's jsonld playground examples are pretty good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants