Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for packages and components in puml files #1321

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

uhafner
Copy link

@uhafner uhafner commented Jun 14, 2024

It makes sense to use packages or components as the items that define the allowed dependencies that are checked with the adhereToPlantUmlDiagram method (see documentation).

This PR changes the allowed syntax so that the following examples are valid input definitions for adhereToPlantUmlDiagram:

@startuml
component "Web API" <<..web>> as web
component "Use Cases" <<..usecase>> as usecase
component "Persistence" <<..persistence>> as persistence

web --> usecase
usecase --> persistence
@enduml

components-long-syntax

@startuml
package "Web API" <<..web>> as web
package "Use Cases" <<..usecase>> as usecase
package "Persistence" <<..persistence>> as persistence

web --> usecase
usecase --> persistence
@enduml

packages-long-syntax

Note: to keep the regexp simple, the format component name without quotation marks is not supported yet, so you always need to specify the name as component "name"

It makes sense to use packages or components as the items
that define the allowed project dependencies.

Signed-off-by: Ulli Hafner <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant