Skip to content

Add JSON Schema for QueryByExample#593

Open
msporny wants to merge 2 commits intomainfrom
qbe-json-schema
Open

Add JSON Schema for QueryByExample#593
msporny wants to merge 2 commits intomainfrom
qbe-json-schema

Conversation

@msporny
Copy link
Contributor

@msporny msporny commented Feb 10, 2026

This PR is an attempt to address issue #538 by providing a JSON Schema for QueryByExample.

Comment on lines +65 to +68
"items": {
"type": "string",
"format": "uri"
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will want an "AcceptedIssuer" type here as well, to allow an object with various properties.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dlongley noted on the call today that we should think about supporting this:

acceptedIssuers: [did, {"recognizedIn": <here>}]

"type": "array",
"description": "List of accepted cryptographic suites for credential proofs",
"items": {
"$ref": "#/$defs/Cryptosuite"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to call this an "AcceptedCryptosuite" type instead.

"type": "array",
"description": "List of accepted envelope formats for credentials",
"items": {
"$ref": "#/$defs/Envelope"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might want to call this an "AcceptedEnvelope" type instead.

"credentialSubject": {
"type": "object",
"description": "Properties that the credential subject should have",
"properties": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We might need to explicitly set additionalProperties: true. I don't recall what the JSON schema default value is.

@PatStLouis
Copy link
Collaborator

The json schema will need to take into account the accepted* fields and their recent structure (being an array of objects or strings). @dlongley commented more details about this above.

Schema could also be revisited at some point in the future to support other query types.

@PatStLouis
Copy link
Collaborator

Discussed on the call: @msporny will go over comments and update relevant object / types.

Issue #598 has been opened for ongoing discussions about adding features to the acceptedIssuers list

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants