在 Microsoft 应用程序清单中添加 "bots" 条目:"A value without a type name was found"

Adding "bots" entry in Microsoft App Manifest: "A value without a type name was found"

我正在使用在线应用程序清单编辑器 (portal.azure.com/#blade/Microsoft_AAD_RegisteredApps/ApplicationMenuBlade/Manifest/appId/...) 将自定义机器人添加到我的应用程序清单。我将这部分添加到 JSON:

"bots": [
{
  "botId": "[same-string-as-in-field-appId]",
  "scopes": [ "team", "personal", "groupchat" ]
}]

当我尝试保存清单时,我得到:

“无法更新 [...] 应用程序。错误详细信息:找到没有类型名称的值,并且没有可用的预期类型。指定模型后,有效负载中的每个值都必须具有一个类型可以在负载中指定,由调用者显式指定或从父值隐式推断。[k+sF5]"

我认为这是由于架构版本控制问题造成的,但我不知道如何解决。或者添加该部分的位置是否重要?我只是将其添加到所有其他顶级 JSON 元素下方。

注意:根据您添加到清单中的数据,您似乎正在尝试创建 Teams 机器人,所以我已经这样回答了。如果不是这种情况,请告诉我,我会编辑我的答案。

您似乎编辑了错误的清单。在 Azure 门户中找到的清单(包括您链接到的清单)是 A​​zure 资源的部署清单。在本例中,它是您的应用程序注册的部署清单。

您需要做的是为您的 Teams 机器人构建一个清单。 Here's a link to the schema。这是基于我的一个机器人的示例:

{
  "$schema": "https://developer.microsoft.com/json-schemas/teams/v1.7/MicrosoftTeams.schema.json",
  "manifestVersion": "1.7",
  "version": "1.0.0",
  "id": "<myAppId>",
  "packageName": "com.notification.bot",
  "localizationInfo": {
    "defaultLanguageTag": "en-us",
    "additionalLanguages": [
    ]
  },
  "developer": {
    "name": "My Name",
    "websiteUrl": "https://dev.botframework.com/",
    "privacyUrl": "https://aka.ms/bf-privacy",
    "termsOfUseUrl": "https://aka.ms/bf-terms",
    "mpnId": "<random ID>"
  },
  "name": {
    "short": "Notification Bot",
    "full": "GitHub Issue Notification Bot"
  },
  "description": {
    "short": "GitHub Issue Notification Bot",
    "full": "GitHub Issue Notification Bot"
  },
  "icons": {
    "outline": "outline.png",
    "color": "color.png"
  },
  "accentColor": "#fc4103",
  "configurableTabs": [
  ],
  "staticTabs": [
  ],
  "bots": [
    {
      "botId": "<myAppId>",
      "scopes": [
        "team",
        "personal",
        "groupchat"
      ],
      "needsChannelSelector": false,
      "isNotificationOnly": false,
      "supportsFiles": false,
      "commandLists": [
      ]
    }
  ],
  "connectors": [
  ],
  "composeExtensions": [
  ],
  "permissions": [
    "identity",
    "messageTeamMembers"
  ],
  "devicePermissions": [
  ],
  "validDomains": [
    "token.botframework.com"
  ],
  "showLoadingIndicator": false,
  "activities": {
  }
}

之后,您需要create your upload package。如您所见,它包括:

  1. 我们上面创建的manifest.json
  2. 一个彩色的 192x192 图标
  3. 一个白色透明的 32x32 图标

Here's a link to one of our samples that has all three of these items.

然后你将所有这些压缩起来 upload your bot/app