readme update to include relationship types and diagram type parameters

pull/84/head
Adrian Lupu 5 years ago
parent f60e6b0b10
commit c9741e75a2

@ -1,5 +1,4 @@
' C4-PlantUML
' https://github.com/adrianvlupu/C4-PlantUML
' Colors
' ##################################

@ -107,30 +107,32 @@ Rel_R(api, db, "Reads/Writes")
## Supported Diagram Types
Diagram types
* System Context & System Landscape diagrams
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Context.puml`
* Macros:
* `Person`
* `Person(alias, label, ?description, ?sprite)`
* `Person_Ext`
* `System`
* `System(alias, label, ?description, ?sprite)`
* `System_Ext`
* `Boundary`
* `Boundary(alias, label, ?type)`
* `Enterprise_Boundary(alias, label)`
* `System_Boundary`
* `Enterprise_Boundary`
* Container diagram
* Import: `!include https://raw.githubusercontent.com/adrianvlupu/latest/C4_Container.puml`
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml`
* Additional Macros:
* `Container`
* `Container(alias, label, technology, ?description, ?sprite)`
* `ContainerDb`
* `ContainerQueue`
* `Container_Ext`
* `ContainerDb_Ext`
* `ContainerQueue_Ext`
* `Container_Boundary`
* `Container_Boundary(alias, label)`
* Component diagram
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml`
* Additional Macros:
* `Component`
* `Component(alias, label, technology, ?description, ?sprite)`
* `ComponentDb`
* `ComponentQueue`
* `Component_Ext`
@ -139,26 +141,29 @@ Rel_R(api, db, "Reads/Writes")
* Dynamic diagram
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Dynamic.puml`
* Additional Macros:
* `RelIndex`
* `increment`
* `setIndex`
* `RelIndex(index, from, to, label)`
* `increment()`
* `setIndex(number)`
* Deployment diagram
* Import: `!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml`
* Additional Macros:
* `Deployment_Node`
* `Deployment_Node(alias, label, ?type)`
Take a look at each of the [C4 Model Diagram Samples](samples/C4CoreDiagrams.md).
## Snippets for Visual Studio Code
## Relationship Types
Because the PlantUML support inside of Visual Studio Code is excellent with the [PlantUML extension](https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml), you can also find VS Code snippets for C4-PlantUML at [.vscode/C4.code-snippets](.vscode/C4.code-snippets).
* `Rel(from, to, label, ?technology)`
* `BiRel` (bidirectional relationship)
Project level snippets are now supported in [VSCode 1.28](https://code.visualstudio.com/updates/v1_28#_project-level-snippets).
Just include the `C4.code-snippets` file in the `.vscode` folder of your project.
You can force the direction of a relationship by using:
It is possible to save them directly inside VS Code: [Creating your own snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets).
* `Rel_U`, `Rel_Up`
* `Rel_D`, `Rel_Down`
* `Rel_L`, `Rel_Left`
* `Rel_R`, `Rel_Right`
![C4-PlantUML Snippets Video](images/vscode_c4plantuml_snippets.gif)
In rare cases, you can force the layout using hidden relationships, `Lay_U`, `Lay_D`, `Lay_L`, `Lay_R`.
## Layout Options
@ -169,6 +174,17 @@ C4-PlantUML also comes with some layout options to make it easy and reuseable to
* [LAYOUT_AS_SKETCH()](LayoutOptions.md#layout_as_sketch)
* [HIDE_STEREOTYPE()](LayoutOptions.md#hide_stereotype)
## Snippets for Visual Studio Code
Because the PlantUML support inside of Visual Studio Code is excellent with the [PlantUML extension](https://marketplace.visualstudio.com/items?itemName=jebbs.plantuml), you can also find VS Code snippets for C4-PlantUML at [.vscode/C4.code-snippets](.vscode/C4.code-snippets).
Project level snippets are now supported in [VSCode 1.28](https://code.visualstudio.com/updates/v1_28#_project-level-snippets).
Just include the `C4.code-snippets` file in the `.vscode` folder of your project.
It is possible to save them directly inside VS Code: [Creating your own snippets](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_creating-your-own-snippets).
![C4-PlantUML Snippets Video](images/vscode_c4plantuml_snippets.gif)
## Advanced Samples
The following advanced samples are reproductions with C4-PlantUML from official [C4 model samples](https://c4model.com/#examples) created by [Simon Brown](http://simonbrown.je/).

Loading…
Cancel
Save