无法在 Azure 逻辑应用程序中使用 swagger 3.0.1
Unable to use swagger 3.0.1 in Azure logic apps
当我尝试从我的逻辑应用添加 swagger 端点时,它失败了,即使它成功获取了内容。
Failed to fetch swagger with error message: Invalid response: {"openapi":"3.0.1","info":{"title":"My Swagger API"
...
...
...} Ensure you have CORS enabled on the endpoint and are calling a valid HTTPS endpoint.
我尝试了各种可能的方式来解决 CORS 问题,但最终让它起作用的是强制 swagger 的 2.0 版:
app.UseSwagger(o => o.SerializeAsV2 = true);
有没有人大摇大摆地 3.x 使用 Logic Apps?
好的,我已经在我这边复制了这个问题,并且我在打开 API 时观察到同样的问题。
这里要注意的关键词是 "OpenAPI" 规范。这不是招摇的规范。我找到了官方文档,上面清楚地写着 Swagger(not OpenAPI)。请参考Call REST endpoints by using Azure Logic Apps
您可以尝试通过创建自定义连接器来解决此问题
当我尝试从我的逻辑应用添加 swagger 端点时,它失败了,即使它成功获取了内容。
Failed to fetch swagger with error message: Invalid response: {"openapi":"3.0.1","info":{"title":"My Swagger API" ... ... ...} Ensure you have CORS enabled on the endpoint and are calling a valid HTTPS endpoint.
我尝试了各种可能的方式来解决 CORS 问题,但最终让它起作用的是强制 swagger 的 2.0 版:
app.UseSwagger(o => o.SerializeAsV2 = true);
有没有人大摇大摆地 3.x 使用 Logic Apps?
好的,我已经在我这边复制了这个问题,并且我在打开 API 时观察到同样的问题。 这里要注意的关键词是 "OpenAPI" 规范。这不是招摇的规范。我找到了官方文档,上面清楚地写着 Swagger(not OpenAPI)。请参考Call REST endpoints by using Azure Logic Apps
您可以尝试通过创建自定义连接器来解决此问题