fuelen / ecto_erd

A mix task for generating Entity Relationship Diagram from Ecto schemas available in your project.
Apache License 2.0
215 stars 15 forks source link

Support Embeds in Mermaid #49

Open zorbash opened 1 year ago

zorbash commented 1 year ago

Hi @fuelen and thank you for this lovely library.

I noticed that embedded schemas are not supported when the output document is set to Mermaid. Ecto.ERD.Document.Mermaid.schemaless?/0 returns true which instructs Graph.new/2 to graph associations but not embeds. What's blocking embeds support in Mermaid? I'd be happy to contribute a PR to add support.

fuelen commented 1 year ago

Hi @zorbash Thank you for such kind words :)

What's blocking embeds support in Mermaid?

I think in previous versions of Mermaid, it was not possible to wrap entity name into quotes, thus it was not possible to specify "MyModule.MyName" as an entity name. Seems like this limitation is absent today. Here is a related issue https://github.com/mermaid-js/mermaid/issues/3171