UML Diagrams: Can't specify `shape`-class-attribute
kusnezoff-alexander opened this issue · comments
kusnezoff-alexander commented
I am trying to model a class, which has a property named shape
(defined by another library, so unfortunately I can't change its name).
The following workarounds don't work:
myclass: {
shape: class
# quote
"shape": String
}
myclass: {
shape: class
# capitalize
Shape: String
}
I always get the following error:
4:12: unknown shape "String"
It would be nice to somehow escape custom properties named shape
😀
Possible Solution
Add possibility to escape custom properties named shape
in UML diagrams.
Steps to Reproduce
Try to compile one of these examples (eg in https://play.d2lang.com/)
myclass: {
shape: class
# quote
"shape": String
}
myclass: {
shape: class
# capitalize
Shape: String
}
kusnezoff-alexander commented
Nvm: Adding visibility to the shape
field solves the problem.
myclass: {
shape: class
+shape: a
}