{
  "openapi": "3.1.0",
  "info": {
    "title": "Fund Structured Verification A2A Interface",
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://fund-runtime-fixture.mrhino.chatgpt.site/a2a/v1"
    }
  ],
  "paths": {
    "/message:send": {
      "post": {
        "operationId": "sendVerificationMessage",
        "requestBody": {
          "required": true,
          "content": {
            "application/a2a+json": {
              "schema": {
                "$ref": "#/components/schemas/SendMessageRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Correlated A2A agent message containing the verification result.",
            "content": {
              "application/a2a+json": {
                "schema": {
                  "$ref": "#/components/schemas/SendMessageResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "VerificationPayload": {
        "type": "object",
        "additionalProperties": false,
        "required": ["fixture_id", "expected_fields", "payload"],
        "properties": {
          "fixture_id": { "type": "string" },
          "expected_fields": {
            "type": "array",
            "items": { "type": "string" }
          },
          "payload": { "type": "object" }
        }
      },
      "SendMessageRequest": {
        "type": "object",
        "required": ["message"],
        "properties": {
          "message": {
            "type": "object",
            "required": ["messageId", "role", "parts"],
            "properties": {
              "messageId": { "type": "string" },
              "role": { "const": "ROLE_USER" },
              "parts": {
                "type": "array",
                "minItems": 1,
                "maxItems": 1,
                "items": {
                  "type": "object",
                  "required": ["data", "mediaType"],
                  "properties": {
                    "data": { "$ref": "#/components/schemas/VerificationPayload" },
                    "mediaType": { "const": "application/json" }
                  }
                }
              }
            }
          }
        }
      },
      "SendMessageResponse": {
        "type": "object",
        "required": ["message"],
        "properties": {
          "message": {
            "type": "object",
            "required": ["messageId", "contextId", "role", "parts"]
          }
        }
      }
    }
  }
}
