chore: separate ash doc index from doc index

This commit is contained in:
Zach Daniel 2022-03-24 22:29:18 -04:00
parent e7f9bfe88c
commit cc58d7c9ba
2 changed files with 21 additions and 14 deletions

View file

@ -1,19 +1,13 @@
defmodule Ash.DocIndex do defmodule Ash.DocIndex.AshDocIndex do
@moduledoc "A module for configuring how a library is rendered in ash_hq" @moduledoc "Doc index for Ash"
@type extension :: %{ @behaviour Ash.DocIndex
optional(:module) => module,
optional(:target) => String.t(),
optional(:default_for_target?) => boolean,
optional(:name) => String.t(),
optional(:type) => String.t()
}
@callback extensions() :: list(extension())
@behaviour __MODULE__
@impl true @impl true
@spec extensions() :: list(extension) @spec for_library() :: String.t()
def for_library, do: "ash"
@impl true
@spec extensions() :: list(Ash.DocIndex.extension())
def extensions do def extensions do
[ [
%{ %{

View file

@ -0,0 +1,13 @@
defmodule Ash.DocIndex do
@moduledoc "A module for configuring how a library is rendered in ash_hq"
@type extension :: %{
optional(:module) => module,
optional(:target) => String.t(),
optional(:default_for_target?) => boolean,
optional(:name) => String.t(),
optional(:type) => String.t()
}
@callback extensions() :: list(extension())
@callback for_library() :: String.t()
end