Since version 1.4, Miredot PRO documents individual JSON fields (only HTML, not shown in the DOCX export). To document the fields, Miredot reads the Javadoc comments associated with the field/getter/setter methods of the classes that define the different fields of the payload. The precedence of these three locations is as follows:
This is in line with how asymmetric payloads are dealt with. In the output documentation, the comments are shown by default but there is a toggle present to hide them. It is possible to override this behaviour with the jsonDoc option in the html output section. Valid values are:
Enabled
: include and show the JSON Payload documentation (default)
Disabled
: do not include the JSON Payload documentation
Hidden
: include the JSON Payload documentation, but hide it by default.
Example:
<configuration>
<output>
<html>
<jsonDoc>Hidden</jsonDoc>
</html>
</output>
</configuration>
miredot {
output {
formats {
'html' {
jsonDoc = 'Hidden'
}
}
}
}
By default, only the first line/sentence of the comment is shown inline. If there is more than one line of documentation, the full text is shown in a popup when hovering (since Miredot 1.6). If you do not want the latter, this can be disabled (see futher).
Example output: this code-snippet results in the documentation shown in the screenshot below.
/**
* This is the commentary that will be shown in the commentary widget,
* it provides more detailed documentation.
*
* @return The first street line.
*/
public String getStreet1() {
return street1;
}
By default multiline comments are enabled. You can explicitly enable or disable this behavior
showFullFieldDocumentationOnHover
parameter. Example configurations for Maven and Gradle can be found below:
<configuration>
<output>
<html>
<showFullFieldDocumentationOnHover>
false
</showFullFieldDocumentationOnHover>
</html>
</output>
</configuration>
miredot {
output {
formats {
'html' {
showFullFieldDocumentationOnHover = false
}
}
}
}