Skip to content

Presentation Definition: be lenient about single-entry arrays v.s. singular values #4126

@reinkrul

Description

@reinkrul

credentialSubject can be an array or a single object. The Presentation Definition specify to handle both, unless it's 100% certain it's one of them.

However, this is quite error prone. Maybe we should treat single-entry arrays and singular values the same when matching Presentation Definitions, regardless whether we're indexing an array (entry 0) or not?

Meaning, these Presentation Definition constraint paths are equivalent when the credentialSubject is an array or an object:

  • credentialSubject[0].some.other.property
  • credentialSubject.some.other.property

If credentialSubject is an array with multiple entries, or the credentialSubject[x] is indexed with x != 0, this semantic doesn't apply.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions