为什么我的API App服务逻辑应用程序无法使用我的API应用程序?

时间:2015-04-20 10:14:05

标签: azure azure-web-sites azure-logic-apps azure-api-apps

我创建了一个带有测试控制器的简单api,并将其作为Azure Api应用程序发布。我启用了公共(匿名)访问,swagger ui在浏览器中运行良好,并且swagger正确验证,我已经添加了Logic Apps所需的默认响应设置。

但是,当我尝试将Api应用程序添加到我的Logic App时,我遇到了一个错误:“获取swagger api定义时出错”。

如果我尝试在门户网站中浏览API定义,我会遇到另一个错误“无法获取API定义。可能需要在API应用程序上进行其他配置或身份验证。”

如果我尝试从门户网站链接下载swagger数据,则会失败并显示Http 400: Bad Request

我在这里缺少什么,如何在门户网站上使用这个简单的Api应用程序?

公开URI:https://microsoft-apiappf6c70a179b1b408c99e3f2536467ff39.azurewebsites.net

Swagger UI:https://microsoft-apiappf6c70a179b1b408c99e3f2536467ff39.azurewebsites.net/swagger/ui/index

Raw Swagger:

{"swagger":"2.0","info":{"version":"v1","title":"PE.Services.Idml"},"host":"microsoft-apiappf6c70a179b1b408c99e3f2536467ff39.azurewebsites.net:443","schemes":["https"],"paths":{"/api/ToEpl":{"get":{"tags":["ToEpl"],"operationId":"ToEpl_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}},"default":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}},"deprecated":false},"post":{"tags":["ToEpl"],"operationId":"ToEpl_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"value","in":"body","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","schema":{"$ref":"#/definitions/Object"}},"default":{"description":"OK","schema":{"$ref":"#/definitions/Object"}}},"deprecated":false}},"/api/ToEpl/{id}":{"get":{"tags":["ToEpl"],"operationId":"ToEpl_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"string"}},"default":{"description":"OK","schema":{"type":"string"}}},"deprecated":false},"put":{"tags":["ToEpl"],"operationId":"ToEpl_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int32"},{"name":"value","in":"body","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}},"deprecated":false},"delete":{"tags":["ToEpl"],"operationId":"ToEpl_Delete","consumes":[],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int32"}],"responses":{"204":{"description":"No Content"}},"deprecated":false}},"/api/Values":{"get":{"tags":["Values"],"operationId":"Values_Get","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"responses":{"200":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}},"default":{"description":"OK","schema":{"type":"array","items":{"type":"string"}}}},"deprecated":false},"post":{"tags":["Values"],"operationId":"Values_Post","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":[],"parameters":[{"name":"value","in":"body","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}},"deprecated":false}},"/api/Values/{id}":{"get":{"tags":["Values"],"operationId":"Values_GetById","consumes":[],"produces":["application/json","text/json","application/xml","text/xml"],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"OK","schema":{"type":"string"}},"default":{"description":"OK","schema":{"type":"string"}}},"deprecated":false},"put":{"tags":["Values"],"operationId":"Values_Put","consumes":["application/json","text/json","application/xml","text/xml","application/x-www-form-urlencoded"],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int32"},{"name":"value","in":"body","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"No Content"}},"deprecated":false},"delete":{"tags":["Values"],"operationId":"Values_Delete","consumes":[],"produces":[],"parameters":[{"name":"id","in":"path","required":true,"type":"integer","format":"int32"}],"responses":{"204":{"description":"No Content"}},"deprecated":false}}},"definitions":{"Object":{"type":"object","properties":{}}}}

0 个答案:

没有答案