Skip to content

Document and improve ExDoc usage #32

Description

@btkostner

First off, this project is super awesome! I love being able to have always up to date mermaid diagrams for my Ecto schemas.

I am currently using this library to generate mermaid diagrams in ex_doc. I think this usage is pretty common, but it's not documented and the API is a little verbose.

I can get mermaid diagrams outputted like so:

  @moduledoc """
  This is information about our `ATcms.Account` context.

  #{ATcms.Account.UserSchema |> Code.ensure_loaded!() |> then(fn _ -> "" end)}

  ` ` `mermaid
  #{Ecto.ERD.Document.render([ATcms.Account.UserSchema], ".mmd", &Function.identity/1, [])}
  ` ` `
  """

We should document this use case so other people can enjoy the fun! Secondly, it would be awesome to clean up this code and make it easier to use. Something like Ecto.ERD.render([ATcms.Account.UserSchema], ".mmd") that would ensure the code is loaded and render out the modules to mermaid.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions