When using the UML option --uml-uses=generalization or --uml-uses=realization added with PR #868, the generalization or realization relation is rendered the wrong way around.
Assuming that a grouping is considered an abstract class (superclass), then the class which includes the uses statement can be considered the subclass of this abstract class (the grouping) and thus a generalization relation should define a path from the subclass to the superclass with the hollow triangle at the end of the path where it meets the more general superclass.
The following example illustrate what has been fixed.
The YANG data model used to test this fix
```
module test-uses-grouping {
namespace "http://www.example.com/ns/yang/my-uses-module-1";
prefix tst-uses-grp;
revision 2024-01-31 {
description
"Initial revision.";
reference
"None.";
}
grouping grouping {
description
"A grouping.";
leaf a-leaf {
type string;
description
"A leaf.";
}
}
container container {
description
"A container.";
uses grouping;
}
}
```
When using the UML option --uml-uses=generalization or --uml-uses=realization added with PR #868, the generalization or realization relation is rendered the wrong way around.
Assuming that a grouping is considered an abstract class (superclass), then the class which includes the uses statement can be considered the subclass of this abstract class (the grouping) and thus a generalization relation should define a path from the subclass to the superclass with the hollow triangle at the end of the path where it meets the more general superclass.
The following example illustrate what has been fixed.
The YANG data model used to test this fix
``` module test-uses-grouping { namespace "http://www.example.com/ns/yang/my-uses-module-1"; prefix tst-uses-grp; revision 2024-01-31 { description "Initial revision."; reference "None."; } grouping grouping { description "A grouping."; leaf a-leaf { type string; description "A leaf."; } } container container { description "A container."; uses grouping; } } ```Example
Before the fix:
After the fix: