Search code examples
spring-bootswaggerdocumentation

How to generate this Spring-boot API documentation example?


I'm trying to track down how some Java Spring-boot API was generated by a developer who has since left the company. The document looks like this:

enter image description here

We have swagger, but this doesn't look like anything generated from that. Definitely doesn't look like javadoc. Any ideas?

Thanks to the answer by João Dias, I found this in pom.xml:

<!-- Run the generated asciidoc through Asciidoctor to generate other 
        documentation types, such as PDFs or HTML5 -->
    <plugin>
        <groupId>org.asciidoctor</groupId>
        <artifactId>asciidoctor-maven-plugin</artifactId>
        <version>1.5.6</version>
        <!-- Include Asciidoctor PDF for pdf generation -->
        <dependencies>
            <dependency>
                <groupId>org.asciidoctor</groupId>
                <artifactId>asciidoctorj-pdf</artifactId>
                <version>1.5.0-alpha.16</version>
            </dependency>
            <dependency>
                <groupId>org.jruby</groupId>
                <artifactId>jruby-complete</artifactId>
                <version>1.7.21</version>
            </dependency>
        </dependencies>
        <!-- Configure generic document generation settings -->
        <configuration>
            <sourceDirectory>${asciidoctor.input.directory}</sourceDirectory>
            <sourceDocumentName>index.adoc</sourceDocumentName>
            <attributes>
                <doctype>book</doctype>
                <toc>left</toc>
                <toclevels>3</toclevels>
                <numbered></numbered>
                <hardbreaks></hardbreaks>
                <sectlinks></sectlinks>
                <sectanchors></sectanchors>
                <generated>${generated.asciidoc.directory}</generated>
            </attributes>
        </configuration>
        <!-- Since each execution can only handle one backend, run separate executions 
            for each desired output type -->
        <executions>
            <execution>
                <id>output-html</id>
                <phase>test</phase>
                <goals>
                    <goal>process-asciidoc</goal>
                </goals>
                <configuration>
                    <backend>html5</backend>
                    <outputDirectory>${asciidoctor.html.output.directory}</outputDirectory>
                </configuration>
            </execution>
        </executions>
    </plugin>
</plugins>
<pluginManagement>

Solution

  • If I am not mistaken this is Spring REST Docs. For more details: