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
85 stars 37 forks source link

Optional constraint fields #377

Closed mistermoe closed 1 year ago

mistermoe commented 2 years ago

Is there any way other than using submission_requirements to support an optional field? e.g. middleName. Include it if you have it. It’d be somewhat unfortunate if optional fields aren’t supported in a way aside from using submission_requirements wherein two input_descriptor objects are provided for the same group and only 1 must be satisfied. 1 input_descriptor would include the optional field in its fields array and 1 would exclude it… thus creating support for optional fields (albeit janky and verbose)

csuwildcat commented 2 years ago

@dtmcg @brentzundel @kimdhamilton I really think this is a necessary addition, and is backwards compatible.

kimdhamilton commented 2 years ago

yes, this makes sense. I wonder if we can reuse the required/preferred pattern here, and have required be default. Although I need to refresh my memory on whether that's applicable here

csuwildcat commented 2 years ago

The default is already 'required' without any property, so if we did optional: true it would be a gracefully upgrading addition.

On Sat, Oct 1, 2022, 9:35 PM Kim Hamilton Duffy @.***> wrote:

yes, this makes sense. I wonder if we can reuse the required/preferred pattern here, and have required be default. Although I need to refresh my memory on whether that's applicable here

— Reply to this email directly, view it on GitHub https://github.com/decentralized-identity/presentation-exchange/issues/377#issuecomment-1264533401, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABAFSURY344QZTDTBUTHLLWBDYHLANCNFSM6AAAAAAQZ43HVE . You are receiving this because you were assigned.Message ID: @.*** .com>

brentzundel commented 1 year ago

is this a duplicate of #375 ?

csuwildcat commented 1 year ago

Yes, it's a dupe, and the PR closed both

brentzundel commented 1 year ago

addressed by #378