1

我正在使用 MMLib.SwaggerForOcelot 作为网关。在 .Net 核心中

在此处输入图像描述

我得到了这个错误。任何想法?

我的上游和下游:

"SwaggerEndPoints": [
    {
      "Key": "skIndustry",
      "Config": [
        {
          "Name": "Industry API",
          "Version": "v1",
          "Url": "http://industryapi:80/swagger/v1/swagger.json"

        }
      ]
    }
]

我的重新路由:

"ReRoutes": [
    {
      "DownstreamPathTemplate": "/{everything}",
      "DownstreamScheme": "http",
      "DownstreamHostAndPorts": [
        {
          "Host": "industryapi/",
          "Port": 80
        }
      ],
      "UpstreamPathTemplate": "/Industry/{everything}",
      "UpstreamHttpMethod": [ "POST", "PUT", "GET" ],
      "SwaggerKey": "skIndustry"
    }
]

谢谢,克鲁斯。

4

1 回答 1

1

请尝试新版本1.3.1

这个 PR 可能解决了类似的问题。

于 2019-06-11T18:14:24.780 回答