PlantUML does not accept dots in keywords, but the current UML plugin does not convert dots in keywords (as permitted for YANG identifiers by RFC 7950 section 6.2) to underscores in the function make_plantuml_keyword().
This fix replaces dots with 2 underscores to ensure there is no chance of a clash of keywords where say both the identifiers 'a.b' and 'a-b' exist.
If PlantUML code is generated from the following test module (no specific UML-specific option specified), PlantUML brings an error.
module test-identifier-dots {
yang-version 1.1;
namespace "http://www.example.com/ns/yang/test-identifier-dots";
prefix tst-id-dots;
revision 2023-07-17 {
description
"Initial revision.";
reference
"None.";
}
identity base-identity {
description
"Base identity for identities.";
}
identity a {
base base-identity;
description
"...";
}
identity a.1 {
base a;
description
"...";
}
identity a-1 {
base a;
description
"...";
}
identity a.2 {
base a;
description
"...";
}
identity a-2 {
base a;
description
"...";
}
identity a.2-b.1 {
base a.2;
description
"...";
}
}
With this fix, the following UML diagram is generated:
PlantUML does not accept dots in keywords, but the current UML plugin does not convert dots in keywords (as permitted for YANG identifiers by RFC 7950 section 6.2) to underscores in the function make_plantuml_keyword().
This fix replaces dots with 2 underscores to ensure there is no chance of a clash of keywords where say both the identifiers 'a.b' and 'a-b' exist.
If PlantUML code is generated from the following test module (no specific UML-specific option specified), PlantUML brings an error.
With this fix, the following UML diagram is generated:![image](https://github.com/mbj4668/pyang/assets/11681631/4dd8df86-b117-48c8-a45a-ec21691bcec2)