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

VC's termOfUse type clarification #537

Closed
Voronar opened this issue Oct 27, 2023 · 3 comments · Fixed by #538
Closed

VC's termOfUse type clarification #537

Voronar opened this issue Oct 27, 2023 · 3 comments · Fixed by #538

Comments

@Voronar
Copy link
Contributor

Voronar commented Oct 27, 2023

According to the https://www.w3.org/TR/vc-data-model/#terms-of-use termsOfUse property MUST specify one or more terms, but in the code https://github.com/spruceid/ssi/blob/main/ssi-vc/src/lib.rs#L76 it is represented exactly as Vec. Maybe OneOrMany type is more appropriate in this case?

@sbihel
Copy link
Member

sbihel commented Oct 31, 2023

Indeed, and yes you're right a OneOrMany would suffice. But that would make a breaking change, so I would recommend changing the deserialisation to accept a single value with https://docs.rs/serde_with/latest/serde_with/struct.OneOrMany.html. Would you like to open a PR with said change?

(cc @timothee-haudebourg in #508 termsOfUse is the opposite, it's a single value)

@Voronar
Copy link
Contributor Author

Voronar commented Oct 31, 2023

Sounds cool. I will do.

Fixed: #538

@sbihel
Copy link
Member

sbihel commented Nov 1, 2023

Thank you, released as part of ssi-vc v0.2.1

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

Successfully merging a pull request may close this issue.

2 participants