RestComm / documentation

Repository for documentation process for RestComm projects
http://www.restcomm.com/
GNU Affero General Public License v3.0
0 stars 11 forks source link

Investigate API documentation tools #16

Open deruelle opened 8 years ago

deruelle commented 8 years ago

The great part about these tools is that they test the code, automatically generate the docs, integrate with AsciiDoc and have strong communities of users.

RobWin commented 8 years ago

Hi,

do you want to use the OpenAPI Spec (Swagger)? Contract-first or Code-first? Or do you plan to develop a HATEOS Rest API?

deruelle commented 8 years ago

It will depend on the projects under https://github.com/RestComm, but most of them are code-first see https://github.com/RestComm/RestComm-Core/tree/master/restcomm/restcomm.http/src/main/java/org/mobicents/servlet/restcomm/http by example. What are the best practices here you would recommend ?

RobWin commented 8 years ago

Since you use JAX-RS and not Spring MVC, you can use this Maven Plugin to generate a Swagger (OpenAPI) Spec file from your source code.

You can use Swagger2Markup directly or its Maven Plugin to convert the Swagger Spec into AsciiDoc/Markdown.

Then use the AsciiDoctor Maven Plugin to convert the Swaggger AsciiDoc into HTML or PDF or EPUB.

RobWin commented 8 years ago

Result would look like this https://raw.githubusercontent.com/Swagger2Markup/swagger2markup/master/images/Swagger2Markup.PNG