Mermaid Diagram
info
We are currently in the process of migrating from PlantUML to Mermaid for our diagram generation. This will remove the external dependency on PlantUML and offer a better user experience. Diagram generation with mermaid is currently supported for integration diagrams and sequence diagrams only.
Summary#
sysl diagram lets you generate sequence or integration diagrams from your specification files using MermaidJS.
Usage#
sysl diagram [<flags>] <MODULE>Output Formats#
Currently SVG is the only supported output format.
Optional Flags#
-i, --integrationdiagram=INTEGRATIONDIAGRAMGenerate an integration diagram (Specify the application name)-s, --sequencediagram=SEQUENCEDIAGRAMGenerate a sequence diagram (Specify 'appname->endpoint')-e, --endpointanalysisGenerate an integration diagram with its endpoints (Specify 'true')-d, --datadiagramGenerate a Data model diagram (Specify 'true')-a, --app=APPOptional flag to specify specific application-e, --endpoint=ENDPOINTOptional flag to specify endpoint-o, --output="diagram.svg"Output file (Default: diagram.svg)
Sequence Diagram#
sysl diagram -s grocerystore.sysl --app GroceryStore --endpoint "POST /checkout"Input Sysl file: GroceryStore.sysl
GroceryStore: /checkout: POST?payment_info=string: Payment <- POST /validate Payment <- POST /pay | Checks out the specified cart return ok <: string
Payment: /validate: POST?payment_info=string: | Validates payment information return 200 <: string
/pay: POST: | Processes a payment return ok <: string
Integration Diagram#
Input Sysl file: GroceryStore.sysl
GroceryStore: /checkout: POST?payment_info=string: Payment <- POST /validate Payment <- POST /pay | Checks out the specified cart return ok <: string
Payment: /validate: POST?payment_info=string: | Validates payment information return 200 <: string
/pay: POST: | Processes a payment return ok <: string
sysl diagram -i grocerystore.sysl --app GroceryStoreData Model Diagram#
Input Sysl file: Payment.sysl
Payment: !type CardInfo: credit_card_number <: string: @sensitive="true" type <: string !type Payment: CardInfo <: CardInfo Amount <: int
PaymentService: !type PaymentProvider: Provider <: string
sysl diagram -d Payment.sysl