Releases: Enteee/plantuml-parser
Releases · Enteee/plantuml-parser
Support for named diagrams
Support for unnamed grouping
Grouping in class diagrams without names is now supported.
@startuml
package {
}
// note: unnamed namespaces are not supported in platuml.
namespace {
}
node {
}
folder {
}
frame {
}
cloud {
}
database {
}
rectangle {
}
@enduml
[
{
"elements": [
{
"name": "",
"title": "",
"type": "package",
"elements": []
},
{
"name": "",
"title": "",
"type": "namespace",
"elements": []
},
{
"name": "",
"title": "",
"type": "node",
"elements": []
},
{
"name": "",
"title": "",
"type": "folder",
"elements": []
},
{
"name": "",
"title": "",
"type": "frame",
"elements": []
},
{
"name": "",
"title": "",
"type": "cloud",
"elements": []
},
{
"name": "",
"title": "",
"type": "database",
"elements": []
},
{
"name": "",
"title": "",
"type": "rectangle",
"elements": []
}
]
}
]
Furthermore we now support newlines before blocks in class diagrams
@startuml
package P1
{
}
class C1
{
}
interface I1
{
}
enum E1
{
}
@enduml
[
{
"elements": [
{
"name": "P1",
"title": "P1",
"type": "package",
"elements": []
},
{
"name": "C1",
"title": "C1",
"isAbstract": false,
"members": [],
"extends_": [],
"implements_": [],
"generics": [],
"stereotypes": []
},
{
"name": "I1",
"title": "I1",
"members": [],
"extends_": [],
"implements_": [],
"generics": [],
"stereotypes": []
},
{
"name": "E1",
"title": "E1",
"members": [],
"extends_": [],
"implements_": [],
"generics": [],
"stereotypes": []
}
]
}
]
Better type parsing
Types after names separated by a ":" are not properly parsed.
@startuml
!theme plain
class Publication {
title : String
}
@enduml
[
{
"elements": [
{
"name": "Publication",
"title": "Publication",
"isAbstract": false,
"members": [
{
"name": "title",
"isStatic": false,
"accessor": "+",
"type": "String"
}
],
"extends_": [],
"implements_": [],
"generics": [],
"stereotypes": []
}
]
}
]
Add Support for C4-PlantUML
Thanks to the awesome work done by @dgassma, plantuml-parser
now supports C4-PlantUML.
@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
Person(personAlias, "Label", "Optional Description")
Container(containerAlias, "Label", "Technology", "Optional Description")
System(systemAlias, "Label", "Optional Description")
Rel(personAlias, containerAlias, "Label", "Optional Technology")
@enduml
[
{
"elements": [
{
"type_": {
"source": "Stdlib_C4",
"name": "Person"
},
"alias": "personAlias",
"label": "Label",
"descr": "Optional Description"
},
{
"type_": {
"source": "Stdlib_C4",
"name": "Container"
},
"alias": "containerAlias",
"label": "Label",
"techn": "Technology",
"descr": "Optional Description"
},
{
"type_": {
"source": "Stdlib_C4",
"name": "System"
},
"alias": "systemAlias",
"label": "Label",
"descr": "Optional Description"
},
{
"type_": {
"source": "Stdlib_C4",
"name": "Rel"
},
"from": "personAlias",
"to": "containerAlias",
"label": "Label",
"techn": "Optional Technology"
}
]
}
]
Thank you @dgassma for your contribution!
Generics and Stereotypes
generics
andstereotypes
of Classes are now part of the parse result
@startuml
class A <G> <<S>>
@enduml
[
{
"elements": [
{
"name": "A",
"title": "A",
"isAbstract": false,
"members": [],
"extends_": [],
"implements_": [],
"generics": [
"G"
],
"stereotypes": [
"S"
]
}
]
}
]