Closed egadin closed 1 year ago
I wrote a test to figure out what can be done. I also tried it out on mermaids live editor
Here is an example of what we can get working. Simple strings as per mermaids parser
Here is what you are trying to do and why it is failing. Periods or special characters in the name of an attribute in a class are breaking in the parser
My hopeful fix for this was the be able to just wrap all the attributes of a class in quotes and folks could put whatever characters they'd like into the models.
Unfortunately, it is not happy with using quotes over attributes. In your example above, enums or models would still cause this issue with special characters such as period. There was a need to overwrite model names because folks in Mongo commonly use underscores to prefix their models. That also made the mermaid cli unhappy. So they added regex patterns to this library to overwrite the prefix with z_Model instead of _Model.
I don't think there is a smart way to handle overwrites for special characters that will make everyone happy. Because of that, I'm not sure how to proceed. If you've got ideas let me know! Happy to collab or review a PR!
Hi just found that the ERD doesn't support having schemas with dots in the mapping
TwoOneOne @map("2.1.1")
for version 1.6.2. I've tried for both mapping a ENUM as in the example and on the models and both cases fail so it seems to be for all instances where you would want to map something.Suspect that the issue is similar to what was mentioned in issue 174. Is the generation limited to only having - and _ as special characters?
Here is a minimal reproducible schema