Monday 6 March 2023

PlantUML: stereotypes in a sequence diagram

We can add stereotypes to the participants using << and >>

 

stereotype.txt

@startuml

participant clientStub <<Generated>>
participant server <<Tested>>

clientStub -> server : Send request
server -> clientStub : Send response

@enduml

Above snippet generate below diagram.


 


 

guillemet character is used to display the stereotype by default. You can disable this with below statement.

skinparam guillemet false

stereotypeDisableGuillemet.txt

@startuml

skinparam guillemet false

participant clientStub <<Generated>>
participant server <<Tested>>

clientStub -> server : Send request
server -> clientStub : Send response

@enduml

Above snippet generate below diagram.



 

Previous                                                    Next                                                    Home

No comments:

Post a Comment