Documentation as Code Approach in Software Development
Documentation as Code aka Docs-as-Code is a popular approach in Software Engineering in which dev team treats documentation same as the code. It means, documentation is written in same tools as software is written. This philosophy brings some advantages like:
- technical integrity: documentation is part of code and integrated to version control, CI/CD tools
- documentation is written together with software
- documentation can be reviewed in each sprint along with developed feature
- documentation is automatically generated with consistent format
Documentation with for example Microsoft Word bases on WYSIWYG word processors, where writer formats the text himself. In Docs-as-Code tools, the text format is automatically generated as you write in lightweight text format.
One of the very first examples of Docs-as-Code can be considered LaTeX that many of us know from our University years. But this does not count really to Docs-as-Code mentality.
Markdown or AsciiDoc are great lightweight markdown tools that are enabling easy documentation and perfectly integrated to scm tools like GitHub. README.md is a perfect example every time you create a new git repository.

PlantUML is a perfect open-source tool for generating software architecture diagrams. This is a nice plugin also for Eclipse, VS Code, Intellij and working fine in all operating systems.

mermaid is a nice alternative to PlantUML with JS syntax. It adds some extra functionalities and comfortable to use for frontend devs.

Swagger Editor is a nice editor that renders yaml files that specify restFul APIs. Based on this specification yaml files, rest api interface can be automatically generated. Here is a nice example from swagger official site:

Nice alternative to this editor is redoc, which is in open-source and paid versions available. With enterprise version, you can have extra functionalities like documenting html format for non-dev colleagues.

Confluence Publisher Plugin from Jenkins can be used to update Conluence pages automatically with each deployment or any step of CI/CD pipeline:

If you are interested in more Software Architecture topics take a look at my other articles.
Relevant Articles:





