vc-data-model icon indicating copy to clipboard operation
vc-data-model copied to clipboard

Verification algorithm drops an input map on the floor

Open jyasskin opened this issue 1 year ago • 1 comments

https://w3c.github.io/vc-data-model/#verification says

This algorithm takes inputs of a media type (string inputMediaType) paired with either a sequence of bytes (byte sequence inputBytes) or a document (map inputDocument)

But inputDocument is never mentioned again in the rest of the algorithm.

jyasskin avatar Jul 01 '24 16:07 jyasskin

Yeah, we'll have to clean that up. There was an implementer comment that noted that they allowed input documents as well as input bytes and wanted that to be highlighted in the algorithm (to make sure people knew that it's fine to pass in either and libraries could deal with either).

The challenge here is that the algorithms can be implemented in any way that a developer would like to implement them (as long as the final result is the same). I'm not sure we need to document every variation, but at the same time, some developers are concerned that their implementation will be viewed as "non-conforming" if they don't follow the algorithms closely.

I'll try to see how we can balance the two desires with the spec text.

msporny avatar Jul 03 '24 13:07 msporny

Thinking about how to express that concern in the spec ... it's the application as a whole that'd be conforming or not, but you're right that it's useful for libraries to be able to say "call me to make your application conform to VC." You could have the first step be

1. Let _inputDocument_ be the result of [=parsing JSON bytes to an Infra value=] given _inputBytes_.

    Note: Libraries that implement this specification might leave this step to the calling application.

(I considered making that a normative "Libraries ... may ...", but you don't have a conformance class for libraries.)

jyasskin avatar Jul 03 '24 17:07 jyasskin

PR #1523 has been raised to address this issue. This issue will be closed once PR #1523 has been merged.

msporny avatar Jul 06 '24 16:07 msporny

PR #1523 has been merged, closing.

msporny avatar Jul 15 '24 14:07 msporny