{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.1/bridging/openAgentResponse.schema.json",
  "title": "Open Agent Response",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/OpenResponseBase"
    },
    {
      "$ref": "agentResponse.schema.json"
    }
  ],
  "$defs": {
    "OpenResponseBase": {
      "title": "Open Response",
      "type": "object",
      "description": "A response to an open request",
      "properties": {
        "type": {
          "title": "Open Response Message Type",
          "const": "openResponse"
        },
        "payload": {
          "title": "Open Response Payload",
          "type": "object",
          "properties": {
            "appIdentifier": {
              "$ref": "../api/api.schema.json#/definitions/AppIdentifier"
            }
          },
          "required": ["appIdentifier"],
          "additionalProperties": false
        },
        "meta": {
          "title": "Open Response Metadata",
          "type": "object"
        }
      },
      "additionalProperties": false
    }
  }
}
