sdk的swagger相当于什么?sdk、swagger

2023-09-07 14:13:52 作者:自愚自乐

是否有某种标准可供人们用来记录他们的库和框架?

Is there somewhat of a standard out there that people use to document their libraries and frameworks?

理想情况下,它会使用 JSON 或 YAML,并允许生成呈现精美的 HTML 页面.

Ideally, it would make use of JSON or YAML and would allow for generation of HTML pages that present it nicely.

推荐答案

SDK 文档最常见的方法是从源代码中的注释生成文档.这样,类/函数参考文档可以轻松地与实现保持同步.

The most common approach to SDK documentation is to generate the docs from the comments in the source code. This way the class/function reference docs can be easily kept in sync with the implementation.

有针对不同编程语言和框架的文档生成器.一些工具可以让您将生成的参考文档与手动编写的概念主题(概述、入门"等)结合起来

There are documentation generators for different programming languages and frameworks. Some tools let you combine the generated reference docs with manually written conceptual topics (overview, "getting started", etc.)

一些流行的工具是:

.NET - 沙堡示例:Sandcastle 文档 示例:Java API 文档 示例:Adblock Plus JSDoc 示例:Python 文档