Creating API documents through code comments

I use aglio to create API documentation. I am currently writing an initial markdown based on the Blueprint API specification. I am wondering if there is a way to generate markdowns through comments directly in the code. Does anyone know how to do this?

+4
source share
2 answers

Technically, this is possible. Depending on your language and frameworks used. For example, in Ruby, you can use RSpec to create an API plan .

I am not familiar with any tool that does something similar for Node.js (for example, using Express.js DSL).

, , Matter Compiler. (Ruby gem) JSON (AST) API Blueprint.

, . API Blueprint , API.

( ).

+3

, API maven.

 <plugin>
    <artifactId>maven-site-plugin</artifactId>
    <groupId>org.apache.maven.plugins</groupId>
    <version>${maven-site-plugin.version}</version>
    <configuration>
      <locales>en,fr</locales>
    </configuration>
  </plugin>

apt , API, maven . . , .

http://maven.apache.org/plugins/maven-site-plugin/examples/creating-content.html

0

Source: https://habr.com/ru/post/1540576/


All Articles