decentralized-identity / presentation-exchange

Specification that codifies an inter-related pair of data formats for defining proof presentations (Presentation Definition) and subsequent proof submissions (Presentation Submission)
https://identity.foundation/presentation-exchange
Apache License 2.0
82 stars 37 forks source link

Input Evaluation clarification in case of Optional fields #437

Closed ejossev closed 9 months ago

ejossev commented 11 months ago

The current wording for optional fields is as follows:

If no value is located for any of the specified path queries, and the fields object DOES NOT contain the optional property or it is set to false, reject the field as invalid. If no value is located for any of the specified path queries and the fields object DOES contain the optional property set to the value true, treat the field as valid and proceed to the next fields object.

What exactly means "no value is located"? Shall it be interpreted that 1. there are no elements found, or 2. there are no elements witch matching values found?

I.e. there are two possible situation, when there is a node found on one of those paths, but the value does not match, and when there is no node found at all, and I have a feeling that it WOULD make sense to handle first scenario as failure resulting in input rejection, and the second one as "ok, move on", but it is not clear.

bumblefudge commented 11 months ago

Discussed on today's call. Case 1.1.3 could be arrived at EITHER if 1.1.1 happened OR 1.1.2 happened. We will attempt an editorial correction for v2.1 to make this clearer

csuwildcat commented 9 months ago

Wording adjusted in https://github.com/decentralized-identity/presentation-exchange/commit/50b335dc28468ac32ad2145bdec71662a20d4504