Azure 函数 v2 (python),VScode 中的 host.json 错误,“当只有一个必须验证时匹配多个架构”

问题描述 投票:0回答:1

我正在构建 Azure 函数 v2 (python),我在 VScode 中出现以下 host.json 错误。

当只有一个模式必须验证时匹配多个模式。

{
  "version": "2.0",
  "logging": {
    "applicationInsights": {
      "samplingSettings": {
        "isEnabled": true,
        "excludedTypes": "Request"
      }
    }
  },
  "extensionBundle": {
    "id": "Microsoft.Azure.Functions.ExtensionBundle",
    "version": "[4.*, 5.0.0)"
  }
}

有什么解决办法吗

python-3.x visual-studio-code azure-functions
1个回答
0
投票

这是一条警告消息,在按照 MS Doc 拥有正确的架构后抛出,但您的函数将按预期工作,并且当您执行它时,调试器还将读取

host.json
文件。

当您使用

func host start --verbose
命令执行该函数时,它将读取 host.json 文件并为您提供预期的函数输出。

enter image description here

enter image description here

我已经提出了github问题以了解有关警告消息的更多信息,您可以关注它以获取最新更新。

© www.soinside.com 2019 - 2024. All rights reserved.