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

JSONSchema issue for 2.1: we are using later syntax? #455

Open kimdhamilton opened 11 months ago

kimdhamilton commented 11 months ago

Some discussion out of IIW: concerns about JSON schema are related to test vectors used to test conformance. We use a more recent syntax that is perhaps difficult for some peoples' toolsets. Syntax might be $ref; need to confirm

If correct, this should be a simple fix for 2.1

kimdhamilton commented 9 months ago

@rado0x54 @andorsk @csuwildcat confirm this is blocking for 2.1 and get owner if so

dif-admin commented 7 months ago

possibly dropped? Could be referring to schemas in repo

kimdhamilton commented 7 months ago

Maybe this is the concern: https://json-schema.org/understanding-json-schema/structuring#dollarref

In Draft 4-7, $ref behaves a little differently. When an object contains a $ref property, the object is considered a reference, not a schema. Therefore, any other properties you put in that object will not be treated as JSON Schema keywords and will be ignored by the validator. $ref can only be used where a schema is expected.

kimdhamilton commented 7 months ago

here is an example this could be referring to. In 4-7, since $ref is in path_nested, type would be ignored by a validator.

https://github.com/decentralized-identity/presentation-exchange/blob/1c24b0b766f1d8cd9e3a7d28a3f5a88719bf8b9b/schemas/presentation-submission.json#L26

Note the above example is recursive. But this is only a problem with a $ref referring to another $ref (source: https://json-schema.org/understanding-json-schema/structuring#recursion)

kimdhamilton commented 7 months ago

After discussion on Feb 29, 2024, we realized we can't reconstruct the concern coming out of IIW. Please provide context on what the concern with $ref was by March 15; otherwise we will close