Azure API Management 在放置 Swagger 定义时返回 InternalServerError



我正尝试按照本博客和参考文档中的步骤,通过Azure API management的REST API导入Swagger定义。然而,我得到一个500错误的响应,正文:

{
  "error": {
    "code": "InternalServerError",
    "message": "Request processing failed due to internal error.",
    "details": null
  }
}

我的请求适用于GET,但不适用于PUT。有没有人能指出我的请求有什么问题,或者我应该调查的潜在设置问题?

这是我发送的请求:

PUT /apis/{app-id}?api-version=2014-02-14-preview&import=true HTTP/1.1
Host: {tenant}.management.azure-api.net
Authorization: SharedAccessSignature uid={uid}&ex={ex}&sn={sn}
Content-Type: application/vnd.swagger.link+json
If-Match: *
Cache-Control: no-cache    
{
    "link": "{app}.cloudapp.azure.com:8165/swagger/docs/0"
}

"link"值应包含模式,即以"http://"或"https://"开头。我们将解决这个问题,以提供更有意义的错误信息。

最新更新