awslabs / aws-icons-for-plantuml

PlantUML sprites, macros, and other includes for Amazon Web Services services and resources
Other
902 stars 152 forks source link

Feature/participants #1

Closed jack-burridge-tp closed 5 years ago

jack-burridge-tp commented 5 years ago

Description of changes: Adds participant types to the generated puml, this allows you to easily draw sequence diagrams, for example:

@startuml
!define AWSPuml /generated/dist/

!include AWSPuml/AWSCommon.puml
!include AWSPuml/Compute/all.puml
!include AWSPuml/Mobile/all.puml

actor User as user
APIGatewayParticipant(api,name,)
LambdaParticipant(lambda,TimeLambda,returns now)
user -> api: Asks time
api -> lambda: Invokes lambda
lambda -> api: Returns time now
api -> user: Returns time
@enduml

Will become: ota_sign_on

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

gadams999 commented 5 years ago

Thanks for the pull request @jack-burridge-tp , looks great. I'll run this through my not-yet-integrated unit and integration tests and get back in a few days.

jack-burridge-tp commented 5 years ago

@gadams999 hide footbox could be added to AWSCommon.puml meaning you hide the participant at the bottom by default For example, using it in the current state:

@startuml
!define AWSPuml /Users/jack/Dev/aws-icons-for-plantuml/dist

!include AWSPuml/AWSCommon.puml
!include AWSPuml/Database/all.puml
!include AWSPuml/Compute/all.puml

hide footbox

actor User as user
LambdaParticipant(lambda,Insert lambda,adds to db)
DynamoDBParticipant(db,Stuff database,holds stuff)

user -> lambda: Invoke lambda with stuff
lambda -> db: Add stuff to database
@enduml

Would become: image

If you want the footbox you just add show footbox to your file, so it is still reversable.

gadams999 commented 5 years ago

I'd prefer to leave default settings as-is (show footbox by default), but document an example to show how to disable (as per yours above).

Reviewed the overall approach and looks clean, great addition to the repo! Will start a review and add some comments there.