rest - 与 Swagger 相比,使用 Spring REST Docs 有什么好处

标签 rest swagger compare spring-restdocs

Spring REST Docs 最近发布,文档说:

This approach frees you from the limitations imposed by tools like Swagger



所以,我想问一下,与 Swagger 相比,Spring REST Docs 何时更适合使用,以及它消除了哪些限制。

最佳答案

我刚刚在这里看到一个演示文稿,其中涉及您的问题以及其他主题:

https://www.youtube.com/watch?v=k5ncCJBarRI&t=26m58s

  • Swagger 根本不支持超媒体/它以 URI 为中心
  • Swagger 检查代码的方法可能会滞后于您的代码。有可能对 Swagger 无法理解的代码进行更改,并且在 Swagger 更新之前无法正确处理。
  • Swagger 需要大量的注释,在 api 文档中在注释中包含您想要的描述性文本是很痛苦的。
  • Swagger 通过检查您的代码无法弄清楚一些事情。

  • 无论如何,这些只是几点。演讲者在讨论它时做得比我好得多。

    关于rest - 与 Swagger 相比,使用 Spring REST Docs 有什么好处,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34457729/

    相关文章:

    java - 无法使用 Spring Boot 和 Jersey 2 提供静态内容

    c++ - 使用自定义比较器声明 C++ 优先级队列的问题

    objective-c - 如何查看字符串是否包含子字符串(objective-c)

    c# - 如何解析包含 C# 列表的 Json WebApi 响应

    java - 分机 JS 5 : How to represent a java form to an ext js model?

    typescript - 运行时错误 : Class extends value [object Object] is not a constructor or null

    c# - 无法解析 'Swashbuckle.AspNetCore.Swagger.ISwaggerProvider' 类型的服务

    Django Rest Swagger APIView

    java - 如何验证字符串数组是否包含某个字符串?

    web-services - POST 请求不适用于本地主机的 IP 地址