ArchUnitNET icon indicating copy to clipboard operation
ArchUnitNET copied to clipboard

PlantUml components grouping support

Open decarufe opened this issue 1 year ago • 0 comments

To simpify diagram it would be nice to support all grouping keywords

  • package
  • node
  • folder
  • frame
  • cloud
  • database

For example in the folling diagram I commented all direct component dependecies and use grouping dependencies instead.

@startuml Architecture Diagram
package ApplicationGroup {
  [Application] <<TheServiceName.WebApi.*>>
}

package DomainGroup {
  [Domain] <<TheServiceName.Domain.*>>
  [Infrastructure] <<TheServiceName.Infra.*>>
  [Databases] <<TheServiceName.Database.*>>
}

package AbstractionsGroup {
  [Abstractions] <<TheServiceName.Abstraction.*>>
}

' These components dependencies are inferred by the package dependencies
' Application --> Databases
' Application --> Infrastructure
' Application --> Domain
ApplicationGroup --> DomainGroup


' These components dependencies are inferred by the package dependencies
' Databases --> Abstractions
' Infrastructure --> Abstractions
' Domain --> Abstractions
Infrastructure -> Domain
DomainGroup --> AbstractionsGroup

' Infer dependencies: Because ApplicationGroup depends on DomainGroup, and DomainGroup depends on AbstractionsGroup, then ApplicationGroup depends on AbstractionsGroup
' Application --> Abstractions
' ApplicationGroup --> AbstractionsGroup


@enduml

I expect:

  • All seteretypes (<<...>>) defined in a group to be considered in that group
  • Dependency validation can be defined between group definition
  • Cascading definition to be validated (i.e.: A --> B and B --> C implies A --> C)

decarufe avatar Jun 28 '23 14:06 decarufe