Test Driven Development is a new approach that was provided by spring rest docs framework.
It expands classical Test Driven Development by adding new phase - documentation. It allows to combine manually written documentation and autogenerated snippets from tests(mockmvc, restassured). You can be sure that your documentation is always up to date.
There results of built documentation are published to github pages: https://tsypuk.github.io/springrestdoc/
SpringFox allows us to integrate SpringBoot app with swagger documentation. To start using it, you need to:
compile 'io.springfox:springfox-swagger2:2.6.1'
compile 'io.springfox:springfox-swagger-ui:2.6.1'
Now you have two more things in your application:
http://localhost:8080/v2/api-docs?group=Module API
http://localhost:8080/swagger-ui.html
Example of how to use diagrams in our documentation.
I'm showing the pipeline, that allows to migrate your project from swagger to asciidoc and start using spring rest docs Test Driven Documentation.
It can be done in two ways:
This two flows are implemented.
Plus like bonus you can move your swagger resource to git markdown/ confluence wiki formats. See tests.