Azure API 应用程序代理生成错误
Azure API App proxy generation error
我能够在 Azure 中成功创建测试 API 和主机。但是,当我尝试创建代理客户端时,收到以下错误。
[Fatal]Error generating service model: The operation 'Get' has a body
parameter, but did not have a supported MIME type ('application/json')
in its Consumes property.
Exception: There was an error during code
generation when trying to add a client for the Microsoft Azure API App
Generating client code and adding to project failed
我检查了 Swagger 文件,Contains 节点是空的。当我把它改成
"consumes": [
"application/json",
"application/xml"
]
代理创建成功。为什么自动生成的 Swagger json 没有设置 Contains 属性?我在创建 API 应用程序时使用了默认的 SwaggerConfig。我缺少一些配置吗?任何帮助将不胜感激。
我能够在 Azure 中成功创建测试 API 和主机。但是,当我尝试创建代理客户端时,收到以下错误。
[Fatal]Error generating service model: The operation 'Get' has a body parameter, but did not have a supported MIME type ('application/json') in its Consumes property.
Exception: There was an error during code generation when trying to add a client for the Microsoft Azure API App
Generating client code and adding to project failed
我检查了 Swagger 文件,Contains 节点是空的。当我把它改成
"consumes": [ "application/json", "application/xml" ]
代理创建成功。为什么自动生成的 Swagger json 没有设置 Contains 属性?我在创建 API 应用程序时使用了默认的 SwaggerConfig。我缺少一些配置吗?任何帮助将不胜感激。