【问题标题】:Swagger UI generating wrong Curl commandSwagger UI 生成错误的 Curl 命令
【发布时间】:2017-04-03 10:24:57
【问题描述】:

由于此查询字符串被截断,Swagger UI 生成错误的 Curl 命令,如下所示

curl -X GET http://domain:8080/v1/endpoint?access_token=affsfafasfa&type=1 -H "accept: application/json" -H "content-type: application/json"

正确的Curl命令应该是这样的

curl -X GET 'http://domain:8080/v1/endpoint?access_token=affsfafasfa&type=1' -H "accept: application/json" -H "content-type: application/json"

以上两个命令的区别在于 http url 周围的引号。那么请告诉我如何在 swagger ui 中实现这一点?

【问题讨论】:

  • Swagger UI 的哪个版本,2.x 还是新的 3.x?
  • @Helen Swagger UI 版本 3.0.2

标签: swagger swagger-ui swagger-editor


【解决方案1】:

我猜你在新版本中找到了a bug。最新的代码已经包含对它的修复。

【讨论】:

    【解决方案2】:

    这是 swagger ui 版本 3.0.2 中的一个错误,swagger 支持团队现已修复此错误https://github.com/swagger-api/swagger-ui/issues/2839

    【讨论】:

      猜你喜欢
      • 2017-11-04
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-10-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多