Skip to content

Incompatibility between JSON Schema (Draft 2020) and Strict JSON-LD Safe Mode #358

@GHkrishna

Description

@GHkrishna

When issuing W3C Verifiable Credentials using JSON-LD, the underlying library (@digitalcredentials/jsonld-signatures) defaults to safe: true. This mode strictly enforces that every property in the credentialSubject must expand to an absolute IRI based on the provided @context.

Our ecosystem utilizes JSON Schema (Draft 2020) for structural validation. While our schemas define properties like "Name" or "ID", these properties are often not explicitly defined in the linked JSON-LD contexts. Consequently, the signCredential process fails with a Safe mode validation error, dropping properties that it deems "unmapped," even though they are structurally valid according to our JSON Schema.

We've currently created a patch and disabled strict mode for validation, but we would later need to align our schemas to the appropriate format.

This is mostly issue caused when updating credo versions to 0.6.x

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions