nuts-foundation / nuts-foundation/nuts-node
Presentation Definition: be lenient about single-entry arrays v.s. singular values
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 28
- Forks
- 23
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 76
Description
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.propertycredentialSubject.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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the Go entry point that matches Presentation Definition constraint paths and review how credentialSubject values are resolved. Verify the requested equivalence for a singular value and a single-entry array, while preserving distinct behavior for multiple entries and indexes other than 0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100