PowerShell Module to create Mermaid diagrams.
Converts a mermaid definition to string.
ConvertTo-MermaidString -Type <String> -Relations <PSObject[]> -ContainerBoundaries <PSObject[]>
[<CommonParameters>]
ConvertTo-MermaidString -Type <String> [-Title <String>] [-Orientation <String>] -Nodes <PSObject[]>
-Links <PSObject[]> -Classes <PSObject[]> -Clicks <PSObject[]> -Subgraphs <PSObject[]> [<CommonParameters>]
ConvertTo-MermaidString -Type <String> [-Title <String>] -Relations <PSObject[]> [<CommonParameters>]
ConvertTo-MermaidString [-Title <String>] -Nodes <PSObject[]> -Links <PSObject[]> -Clicks <PSObject[]>
-Subgraphs <PSObject[]> -Key <String> [-FromFlowchartSubgraph] [<CommonParameters>]
ConvertTo-MermaidString -Components <PSObject[]> -Key <String> -Name <String> [<CommonParameters>]
ConvertTo-MermaidString [-From <String>] [-To <String>] [-Technology <String>] [-Description <String>]
[-Label <String>] [<CommonParameters>]
ConvertTo-MermaidString [-Technology <String>] [-Description <String>] -Key <String> -Name <String>
[<CommonParameters>]
ConvertTo-MermaidString -FirstEntity <String> [-Relationship <PSObject>] [-SecondEntity <String>]
[-Label <String>] [<CommonParameters>]
ConvertTo-MermaidString [-FromFlowchartLink] -SourceNode <String> -SourceHead <String>
-DestinationNode <String> -DestinationHead <String> [-Text <String>] -Line <String> [<CommonParameters>]
ConvertTo-MermaidString [-Text <String>] [-FromFlowchartNode] -Key <String> [-Shape <String>] [-Class <String>]
[<CommonParameters>]
ConvertTo-MermaidString [-FromFlowchartClass] -Name <String> -Style <String> [<CommonParameters>]
ConvertTo-MermaidString [-FromFlowchartClick] -Node <String> -Url <String> [-Tooltip <String>]
[-Target <String>] [<CommonParameters>]
ConvertTo-MermaidString -FirstCardinality <String> -SecondCardinality <String> -Identifying <Boolean>
[<CommonParameters>]
Generates mermaid syntax for definitions created with this module.
$diagram = New-MermaidDiagram -ErDiagram
PS C:\> $diagram | Add-MermaidErRelation Exactly-one Customer places Zero-or-more Order
PS C:\> $diagram | Add-MermaidErRelation Exactly-one Order contains One-or-more LineItem
PS C:\> $diagram | Add-MermaidErRelation One-or-more Customer uses One-or-more DeliveryAddress -NonIdentifying
PS C:\> $diagram | ConvertTo-MermaidString
erDiagram
Customer ||--o{ Order : places
Order ||--|{ LineItem : contains
Customer }|..|{ DeliveryAddress : uses
Create a erDiagram, add a few relations and convert it to a diagram string.
The diagram link type.
Type: String
Parameter Sets: C4ComponentDiagram, flowchart, erDiagram
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Title of the diagram.
Type: String
Parameter Sets: flowchart, erDiagram, flowchartSubgraph
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Collection of relations.
Type: PSObject[]
Parameter Sets: C4ComponentDiagram, erDiagram
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Orientation of the flowchart.
Type: String
Parameter Sets: flowchart
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Collection of nodes for a flowchart.
Type: PSObject[]
Parameter Sets: flowchart, flowchartSubgraph
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Collection of links for a flowchart.
Type: PSObject[]
Parameter Sets: flowchart, flowchartSubgraph
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Collection of classes for a flowchart.
Type: PSObject[]
Parameter Sets: flowchart
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Collection of clicks for a flowchart.
Type: PSObject[]
Parameter Sets: flowchart, flowchartSubgraph
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Collection of subgraphs for a flowchart.
Type: PSObject[]
Parameter Sets: flowchart, flowchartSubgraph
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Collection of container boundaries for a C4Component diagram.
Type: PSObject[]
Parameter Sets: C4ComponentDiagram
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Collection of components for a C4Component diagram.
Type: PSObject[]
Parameter Sets: C4ContainerBoundary
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: C4Relation
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: C4Relation
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
The component technology / implementation.
Type: String
Parameter Sets: C4Relation, C4Component
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Describes the component.
Type: String
Parameter Sets: C4Relation, C4Component
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
First entity of the relation.
Type: String
Parameter Sets: erRelation
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Relationship of the relation.
Type: PSObject
Parameter Sets: erRelation
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
First second of the relation.
Type: String
Parameter Sets: erRelation
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Describes the relation.
Type: String
Parameter Sets: C4Relation, erRelation
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
region flowchartLink
Type: SwitchParameter
Parameter Sets: flowchartLink
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Source node of the link.
Type: String
Parameter Sets: flowchartLink
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Source node of the link.
Type: String
Parameter Sets: flowchartLink
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Destination node of the link.
Type: String
Parameter Sets: flowchartLink
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Destination node of the link.
Type: String
Parameter Sets: flowchartLink
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Link text.
Type: String
Parameter Sets: flowchartLink, flowchartNode
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Type: String
Parameter Sets: flowchartLink
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
region flowchartNode
Type: SwitchParameter
Parameter Sets: flowchartNode
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Identifier of the node/container/component.
Type: String
Parameter Sets: flowchartSubgraph, C4ContainerBoundary, C4Component, flowchartNode
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Shape of the node.
Type: String
Parameter Sets: flowchartNode
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Class of the node.
Type: String
Parameter Sets: flowchartNode
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
region flowchartClass
Type: SwitchParameter
Parameter Sets: flowchartClass
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Name of the class/container.
Type: String
Parameter Sets: C4ContainerBoundary, C4Component, flowchartClass
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Style of the class.
Type: String
Parameter Sets: flowchartClass
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
region flowchartClick
Type: SwitchParameter
Parameter Sets: flowchartClick
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Node of the click.
Type: String
Parameter Sets: flowchartClick
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Url of the click.
Type: String
Parameter Sets: flowchartClick
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Url of the click.
Type: String
Parameter Sets: flowchartClick
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Target of the click.
Type: String
Parameter Sets: flowchartClick
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
region flowchartSubgraph
Type: SwitchParameter
Parameter Sets: flowchartSubgraph
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
Cardinality of the first entity.
Type: String
Parameter Sets: erRelationship
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Cardinality of the second entity.
Type: String
Parameter Sets: erRelationship
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
Flags if one entity may exist without the other. endregion
Type: Boolean
Parameter Sets: erRelationship
Aliases:
Required: True
Position: Named
Default value: False
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.