Skip to content

Commit

Permalink
fix: update handling of arrays with no special chars
Browse files Browse the repository at this point in the history
Hampered by this issue in Mermaid mermaid-js/mermaid#1546
  • Loading branch information
joshprice committed Sep 28, 2022
1 parent c617779 commit 3933dff
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/ash/api/diagram/diagram.ex
@@ -1,6 +1,6 @@
defmodule Ash.Api.Info.Diagram do
@moduledoc """
Generate a Mermaid Entity Relationship Diagram from a specified API.
Generate Mermaid diagrams from a specified API.
"""

def resources_with_attrs(api) do
Expand Down Expand Up @@ -43,10 +43,10 @@ defmodule Ash.Api.Info.Diagram do
def type(:has_one), do: "|o--||"
def type(:many_to_many), do: "}o--o{"

def short_type({:array, t}), do: "[#{short_module(t)}]"
def short_type({:array, t}), do: "ArrayOf#{short_module(t)}"
def short_type(t), do: short_module(t)

def mermaid(api) do
def mermaid_er_diagram(api) do
indent = " "

resources =
Expand Down

0 comments on commit 3933dff

Please sign in to comment.