问题
Is there somewhat of a standard out there that people use to document their libraries and frameworks?
Ideally, it would make use of JSON or YAML and would allow for generation of HTML pages that present it nicely.
回答1:
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.)
Some popular tools are:
- .NET - Sandcastle
- Example: Sandcastle docs
- Java - Javadoc (part of JDK)
- Example: Java API docs
- JavaScript - jsdoc
- Example: Adblock Plus JSDoc
- Python - Sphinx, specifically sphinx-apidoc
- Example: Python docs
- Doxygen supports C/C++, Objective-C, C#, Java, PHP and some other languages
来源:https://stackoverflow.com/questions/46668786/whats-the-equivalent-of-swagger-for-sdks