When the interfaces of your projects include types (transfer objects) that are defined in external modules/binaries, Miredot also picks these up. However, it has no access to the corresponding Javadoc documentation and therefore you will not see the Javadoc documentation for these classes in the output. In practice, this often results in payload fields not being documented properly.
Since version 1.5.1, it is possible to tell Miredot where to look for the source code (and hence Javadoc) of such modules. Miredot will parse the sources in those locations as needed to better document your project.
<configuration>
<restModel>
<externalSources>
<sourceDirs>
<sourceDir>../ext/external-api-project/src/main/java</sourceDir>
</sourceDirs>
</externalSources>
</restModel>
</configuration>
miredot {
restModel {
externalSources {
sourceDirs = [ "../ext/external-api-project/src/main/java" ]
}
}
}
TIP If you need to get the sources from a sources-jar dependency, you can use the maven-dependency-plugin to unpack the sources to a directory first and point Miredot to that directory. Below is an example.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>compile</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>com.yourcompany</groupId>
<artifactId>my.artifact</artifactId>
<type>jar</type>
<classifier>sources</classifier>
<includes>**/*.java</includes>
<overWrite>true</overWrite>
<outputDirectory>${project.build.directory}/mysources</outputDirectory>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>
</plugin>
<configuration>
<restModel>
<externalSources>
<sourceDirs>
<sourceDir>${project.build.directory}/mysources</sourceDir>
</sourceDirs>
</externalSources>
</restModel>
</configuration>