【问题标题】:List Documentation Parts AWS apigateway列出文档部分 AWS apigateway
【发布时间】:2018-09-19 16:45:54
【问题描述】:

通过Terraform,我创建了一个基于swagger 文件的AWS apigateway

我在 swagger 文件中添加了特定的 AWS 端点来记录 API,例如:

"x-amazon-apigateway-documentation": {
"documentationParts": [
  {
    "location": {
      "type": "API"
    },
    "properties": {
      "description": "This is the API description"
    }
  },
  {
    "location": {
      "type": "METHOD",
      "method": "GET",
      "path": "/foo/{bar}"
    },
    "properties": {
      "description": "This is the method description"
    }
  }
]
}

然后我通过AWS console 发布了文档版本 1.0,并且我正在尝试通过 HTTP 获取该文档,如下所述:

List Documentation Parts

但是,很遗憾,我做不到。我正在对端点进行 GET 操作

http://apigateway.eu-central1.amazonaws.com/restapis/<TheIdOfMyApiGateway>/documentation/parts

它甚至没有给我一个 4XX 代码,但根本没有响应或 HTTP 代码。

我做错了什么?

【问题讨论】:

    标签: amazon-web-services swagger aws-api-gateway


    【解决方案1】:

    我的错误是该地区的拼写错误。 我错过了一个破折号,正确的端点是:

    http://apigateway.eu-central-1.amazonaws.com/restapis/<TheIdOfMyApiGateway>/documentation/parts
    

    使用 eu-central-1 而不是 eu-central1

    我检查AWS Regions中的区域命名

    【讨论】:

      猜你喜欢
      • 2019-01-24
      • 2021-08-14
      • 1970-01-01
      • 1970-01-01
      • 2021-11-15
      • 1970-01-01
      • 2019-06-25
      • 2018-01-09
      • 2021-06-19
      相关资源
      最近更新 更多