Closed Voronar closed 8 months ago
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 https://github.com/spruceid/ssi/pull/508 termsOfUse
is the opposite, it's a single value)
Sounds cool. I will do.
Thank you, released as part of ssi-vc v0.2.1
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 asVec
. MaybeOneOrMany
type is more appropriate in this case?