View Source Ash.Api.Info.Diagram (ash v2.17.0)

Generate Mermaid diagrams from a specified API.

Limitations

We can't easily model Ash relationships with Mermaid diagrams because they are unidirectional and could be asymmetric. Mermaid assumes symmetrical, bidirectional relationships. If we try to model all unidirectional relationships as separate lines in the diagram it gets very hard to read very quickly.

Summary

Functions

Generates a Mermaid Class Diagram for a given API.

Generates a Mermaid Entity Relationship Diagram for a given API.

Functions

Link to this function

mermaid_class_diagram(api, opts \\ [indent: " ", show_private?: false])

View Source

Generates a Mermaid Class Diagram for a given API.

Shows only public attributes, calculations, aggregates and actions. Shows a connecting line for relationships with the type of relationship indicated in the attribute list.

Link to this function

mermaid_er_diagram(api, opts \\ [indent: " ", show_private?: false])

View Source

Generates a Mermaid Entity Relationship Diagram for a given API.

Shows only public attributes, calculations, aggregates and actions. Shows a one-to-one line for relationships as enumerating all unidirectional relationships is far too noisy.