Property strings on class diagrams #3189
Labels
Contributor needed
Graph: Class
Status: Approved
Is ready to be worked on
Type: Enhancement
New feature or request
Is your feature request related to a problem? Please describe.
I am trying to use property strings on class diagrams.
In standard UML, operations (methods) have the following syntax:
However, property strings (the last element) are not currently supported by Mermaid.
For instance, the following code is marked as syntactically incorrect:
Describe the solution you'd like
It would be great if Mermaid added support for these property strings.
It doesn't need to do it using curly brackets, if that inserts ambiguity in the syntax of the language. For example, using
[square brackets]
seems like a viable option to me.Describe alternatives you've considered
"quotation marks"
could also work for the implementation of property strings. I think that might be more intuitive.Other option would be to use a similar approach to labels on relationships.
All in all, there's different possibilities for the implementation, and no clear better choice.
Additional context
The following would an example of how to render a property string:
For further context, you can read more about property strings on any UML reference textbook.
A good one is: The Unified Modeling Language User Guide; G. Booch, J. Rumbaugh, I.Jacobson; Addison-Wesley; First Edition. (Chapter 9, "operations").
Another good one is: UML Distilled; M. Fowler; Addison-Wesley; Third Edition. (chapter 3, page 44).
The text was updated successfully, but these errors were encountered: