{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.1/bridging/findIntentAgentRequest.schema.json",
  "title": "FindIntent Agent Request",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/FindIntentRequestBase"
    },
    {
      "$ref": "agentRequest.schema.json"
    }
  ],
  "$defs": {
    "FindIntentRequestBase": {
      "title": "FindIntent Request", 
      "type": "object",
      "description": "A request for details of apps available to resolve a particular intent and context pair.",
      "properties": {
        "type": {
          "title": "FindIntent Request Message Type",
          "const": "findIntentRequest"
        },
        "payload": {
          "title": "FindIntent Request Payload",
          "type": "object",
          "properties": {
            "intent": {
              "title": "Intent name",
              "type": "string"
            },
            "context": {
              "title": "Context argument",
              "$ref": "../context/context.schema.json"
            }
          },
          "required": ["intent"],
          "additionalProperties": false
        },
        "meta": {
          "title" : "FindIntent Request Metadata",
          "type": "object",
          "properties": {
            "requestUuid": true,
            "timestamp": true,
            "source": true
          },
          "unevaluatedProperties": false
        }
      },
      "additionalProperties": false
    }
  }
}
