{
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "title": "PresentationQueryMessageSchema",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/definitions/PresentationQueryMessage"
    }
  ],
  "$id": "https://w3id.org/dspace-dcp/v1.0/presentation/presentation-query-message-schema.json",
  "definitions": {
    "PresentationQueryMessage": {
      "type": "object",
      "properties": {
        "@context": {
          "$ref": "https://w3id.org/dspace-dcp/v1.0/common/context-schema.json"
        },
        "type": {
          "type": "string",
          "const": "PresentationQueryMessage"
        },
        "scope": {
          "type": "array",
          "minItems": 1,
          "items": {
            "type": "string"
          }
        },
        "presentationDefinition": {
          "type": "object",
          "$ref": "https://identity.foundation/presentation-exchange/schemas/presentation-definition.json"
        }
      },
      "anyOf": [
        { "required": ["scope"] },
        { "required": ["presentationDefinition"] }
      ],
      "required": [
        "@context",
        "type"
      ]
    }
  }
}