azure - LogicApp 自定义连接器动态架构响应字段

标签 azure azure-logic-apps

我正在使用自定义连接器并尝试填充动态架构响应

使用x-ms-dynamic-schema

这就是我的招摇:

  responses:
    '200':
      description: Result
      schema:
        description: output description
        type: object
        x-ms-dynamic-schema:
          operationId: OperationId
          parameters:
            ref: {parameter: ref}
          value-path: output

这是 UI 动态内容:

enter image description here

问题是为什么我还看到 BodyItem 字段,而它们没有出现在我的架构响应中:

{
    'output': {
        'type': 'object',
        'properties': {
            'some_field1': {
                'type': 'string',
                'required': True
            },
            'some_field2': {
                'type': 'string',
                'required': True
            },
            'some_field3': {
                'required': True,
                'type': 'array',
                'items': {
                    'type': 'number'
                }
            },
            'some_field4': {
                'required': True,
                'type': 'integer'
            }
        }
    }
}

最佳答案

谢谢@David Meu 的确认。将其作为答案发布以帮助其他社区成员。

Question is why am I seeing also Body and Item fields while they are not appearing in my schema response:

AFAIK,Body 和 Item 是内置对象,适用于先前步骤的任何结果,这些结果列在动态内容下。 当上一个结果的实体中有多个一个对象时,它会提供一个变量作为item,它引用结果中的每个实体,以便您可以轻松地在循环事件中引用以进行迭代。 Body 只是对先前步骤的结果或响应的完整引用,它是完整结果的 json

Because they are not appearing in other connectors responses (Outlook 365 for example)

我们可以在 Outlook 365 中看到正文字段(例如)。对于有结果的事件,只会产生该选项。因此,它取决于事件。

enter image description here

有关详细信息,请参阅此Microsoft 文档:Call an API from a Logic Apps workflow using a custom connector & Extend an OpenAPI definition for a custom connector

关于azure - LogicApp 自定义连接器动态架构响应字段,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70728770/

相关文章:

azure - 逻辑应用程序直到 HTTP 调用收到 400 后循环中断

json - 将 JSON HTTP 请求转换并转换为 XML

azure - 我无法使用 Microsoft Graph API 在 channel 或聊天中发送 chatMessage

azure - 当 Azure 网站已暂停时,如何阻止其使用 CPU 时间?

Azure获取 "Currently Deployed"所有发布管道的列表

Azure API 应用程序对 WebJobs 的支持

azure - 如何使用 powershell 设置 azure 逻辑应用定义

sql - 在 Azure 逻辑应用条件中访问 Azure SQL 存储过程

azure - 逻辑应用 "Get file Content"Sharepoint 连接器对于超过 20MB 的文件超时

azure - 通过 PowerShell 在消耗计划上创建 Azure 函数失败