mbj4668 / pyang

An extensible YANG validator and converter in python
ISC License
528 stars 342 forks source link

Correct issue with the rendering of imported modules for UML plugin #865

Closed nkhancock closed 1 year ago

nkhancock commented 1 year ago

Each imported module of a module being rendered is to be shown an empty packages with a relation from the imported package to the package representing the module.

PlantUML does not render this correctly. This is because the relations are defined within the package representing the module being processed, causing PlantUML keyword referencing the module (package) in the relation definition to be interpreted as a new class.

This correction moves the definitions of the relations to outside of the package, so that the keyword referencing the module (package) is interpreted as the package representing the module being processed.

This change can be verified by creating a UML from ietf-hardware without any UML-specific option specified. Without this change pyang outputs the following: image

With this change pyang outputs the following: image