Skip to content

#211 AddProperty for relationships#212

Merged
kirchsth merged 2 commits intoplantuml-stdlib:masterfrom
kirchsth:feature/211_rel_properties
Feb 26, 2022
Merged

#211 AddProperty for relationships#212
kirchsth merged 2 commits intoplantuml-stdlib:masterfrom
kirchsth:feature/211_rel_properties

Conversation

@kirchsth
Copy link
Member

Implementation of #211

Properties can be added to relationship too like below

@startuml
!include https://raw.githubusercontent.com/kirchsth/C4-PlantUML/extended/C4_Deployment.puml

' default header Property, Value
AddProperty("Name", "Flash")
AddProperty("Organization", "Zootopia")
AddProperty("Tool", "Internet Explorer 7.0")
Person(personAlias, "Label", "Optional Description (with default property header)")

SetPropertyHeader("Property","Value", "Description")
AddProperty("Prop1", "Value1", "Details1")
AddProperty("Prop2", "Value2", "Details2")
Deployment_Node_L(nodeAlias, "Label", "Optional Type", "Optional Description (with custom property header)") {

  WithoutPropertyHeader()
  AddProperty("PropC1", "ValueC1")
  AddProperty("PropC2", "ValueC2")
  Container(containerAlias, "Label", "Technology", "Optional Description (without property header)")
}

System(systemAlias, "Label", "Optional Description (without properties)")

' starting with v.2.5.0 relations support properties too
WithoutPropertyHeader()
AddProperty("PropC1", "ValueC1")
AddProperty("PropC2", "ValueC2")
Rel(personAlias, containerAlias, "Label", "Optional Technology", "Optional Description")
@enduml

properties sample

Additional C4Version() is changed to 2.5.0beta1 too.

It can be tested with my extended branch

BR Helmut

@kirchsth kirchsth linked an issue Feb 26, 2022 that may be closed by this pull request
@kirchsth kirchsth merged commit 6380401 into plantuml-stdlib:master Feb 26, 2022
@kirchsth kirchsth deleted the feature/211_rel_properties branch February 26, 2022 19:01
@Potherca Potherca added this to the v2.5.0 milestone Dec 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

AddProperty for relationships

2 participants