[MDSAL-760] Generate javadoc for unions Created: 11/Jul/22  Updated: 29/Jul/22  Resolved: 29/Jul/22

Status: Resolved
Project: mdsal
Component/s: Binding codegen
Affects Version/s: None
Fix Version/s: 10.0.1

Type: Improvement Priority: Medium
Reporter: Robert Varga Assignee: Samuel Schneider
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Issue split
split from MDSAL-755 Improve javadoc of generated classes Resolved

 Description   

Modern default doclet generates this warning:

[WARNING] /home/nite/odl/mdsal/binding/mdsal-binding-test-model/target/generated-sources/BindingJavaFileGenerator/org/opendaylight/yang/gen/v1/bug8449/rev170516/ContInt32.java:44: warning: no comment
[WARNING] public static final class RefUnionInt32
[WARNING] ^

This is because the union class does not have any javadoc at all. In this particular case the encapsulating type already javadoc:

/**
 *
 * <p>
 * This class represents the following YANG schema fragment defined in module <b>bug8449</b>
 * <pre>
 * container cont-int32 {
 *   leaf ref-union-int32 {
 *     type union {
 *       type int32-ref;
 *     }
 *   }
 * }
 * </pre>
 * <p>To create instances of this class use {@link ContInt32Builder}.
 * @see ContInt32Builder
 *
 */

In this particular case we want to generate a similar comment and quote the 'leaf ref-union-int32' part of the YANG snippet.


Generated at Wed Feb 07 20:10:53 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.