[MDSAL-762] Generate javadoc for ScalarTypes Created: 11/Jul/22  Updated: 14/Sep/22  Resolved: 14/Sep/22

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

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 versions of default doclet are issuing this warning:

[WARNING] /home/nite/odl/mdsal/binding/mdsal-binding-test-model/target/generated-sources/BindingJavaFileGenerator/org/opendaylight/yang/gen/v1/urn/opendaylight/params/xml/ns/_default/value/test/norev/BigUnsignedInteger.java:28: warning: no comment
[WARNING] public BigUnsignedInteger(Uint64 _value) {
[WARNING] ^

This particular instance comes from this YANG snippet:

    typedef big-unsigned-integer {
        type uint64 {
            range "4500000000..6500000000";
        }
        default "5000000000";
    }

We need to generate a similar Javadoc as we do for interfaces, i.e. expose at least the YANG snippet from which we generated the type. Note there are two basic cases here:

  1. typedef, as above, where we should quote the typedef
  2. leaf/leaflist, as in leaf foo { type uint64; range 1..2; }, in which case an inner class is generated, where we should quote the leaf/leaf-list

There are also two different cases in class hierarchy: we may or may not have a superclass. If we do, we need to also reference it in javadoc.


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