mirror of
https://github.com/ash-project/ash.git
synced 2024-09-20 05:23:03 +12:00
docs: work on docs + link structure
This commit is contained in:
parent
ae65d09373
commit
74a1a6c97c
5 changed files with 59 additions and 62 deletions
0
documentation/topics/attributes.md
Normal file
0
documentation/topics/attributes.md
Normal file
|
@ -1,2 +0,0 @@
|
|||
# Overview
|
||||
|
|
@ -78,57 +78,62 @@ defmodule Ash.DocIndex.AshDocIndex do
|
|||
end
|
||||
|
||||
@impl true
|
||||
@spec code_modules :: %{String.t() => list(module)}
|
||||
@spec code_modules :: [{String.t(), list(module)}]
|
||||
def code_modules do
|
||||
%{
|
||||
"Resources" => [
|
||||
Ash.Api,
|
||||
Ash.Resource.Info,
|
||||
Ash.Resource.Change,
|
||||
Ash.Resource.Change.Builtins,
|
||||
Ash.Calculation,
|
||||
Ash.Resource.Calculation.Builtins,
|
||||
Ash.CodeInterface,
|
||||
Ash.Changeset,
|
||||
Ash.Query
|
||||
],
|
||||
"Utilities" => [
|
||||
Ash.Filter,
|
||||
Ash.Sort
|
||||
],
|
||||
"Errors" => [
|
||||
Ash.Error
|
||||
],
|
||||
"Types" => [
|
||||
Ash.Type,
|
||||
Ash.Type.Enum,
|
||||
Ash.Type.Atom,
|
||||
Ash.Type.Binary,
|
||||
Ash.Type.Boolean,
|
||||
Ash.Type.CiString,
|
||||
Ash.CiString,
|
||||
Ash.Type.Date,
|
||||
Ash.Type.Decimal,
|
||||
Ash.Type.DurationName,
|
||||
Ash.Type.Float,
|
||||
Ash.Type.Function,
|
||||
Ash.Type.Integer,
|
||||
Ash.Type.Map,
|
||||
Ash.Type.NaiveDatetime,
|
||||
Ash.Type.String,
|
||||
Ash.Type.Term,
|
||||
Ash.Type.Time,
|
||||
Ash.Type.UUID,
|
||||
Ash.Type.UrlEncodedBinary,
|
||||
Ash.Type.UtcDatetime,
|
||||
Ash.Type.UtcDatetimeUsec
|
||||
],
|
||||
"DSLs and Extensions" => [
|
||||
Ash.Dsl.Entity,
|
||||
Ash.Dsl.Extension,
|
||||
Ash.Dsl.Section,
|
||||
ASh.Dsl.Transformer
|
||||
]
|
||||
}
|
||||
[
|
||||
{"Resources",
|
||||
[
|
||||
Ash.Api,
|
||||
Ash.Resource.Info,
|
||||
Ash.Resource.Change,
|
||||
Ash.Resource.Change.Builtins,
|
||||
Ash.Calculation,
|
||||
Ash.Resource.Calculation.Builtins,
|
||||
Ash.CodeInterface,
|
||||
Ash.Changeset,
|
||||
Ash.Query
|
||||
]},
|
||||
{"Utilities",
|
||||
[
|
||||
Ash.Filter,
|
||||
Ash.Sort
|
||||
]},
|
||||
{"Errors",
|
||||
[
|
||||
Ash.Error
|
||||
]},
|
||||
{"Types",
|
||||
[
|
||||
Ash.Type,
|
||||
Ash.Type.Enum,
|
||||
Ash.Type.Atom,
|
||||
Ash.Type.Binary,
|
||||
Ash.Type.Boolean,
|
||||
Ash.Type.CiString,
|
||||
Ash.CiString,
|
||||
Ash.Type.Date,
|
||||
Ash.Type.Decimal,
|
||||
Ash.Type.DurationName,
|
||||
Ash.Type.Float,
|
||||
Ash.Type.Function,
|
||||
Ash.Type.Integer,
|
||||
Ash.Type.Map,
|
||||
Ash.Type.NaiveDatetime,
|
||||
Ash.Type.String,
|
||||
Ash.Type.Term,
|
||||
Ash.Type.Time,
|
||||
Ash.Type.UUID,
|
||||
Ash.Type.UrlEncodedBinary,
|
||||
Ash.Type.UtcDatetime,
|
||||
Ash.Type.UtcDatetimeUsec
|
||||
]},
|
||||
{"DSLs and Extensions",
|
||||
[
|
||||
Ash.Dsl.Entity,
|
||||
Ash.Dsl.Extension,
|
||||
Ash.Dsl.Section,
|
||||
ASh.Dsl.Transformer
|
||||
]}
|
||||
]
|
||||
end
|
||||
end
|
||||
|
|
|
@ -21,7 +21,7 @@ defmodule Ash.DocIndex do
|
|||
@callback extensions() :: list(extension())
|
||||
@callback for_library() :: String.t()
|
||||
@callback guides() :: list(guide())
|
||||
@callback code_modules() :: %{String.t() => list(module())}
|
||||
@callback code_modules() :: [{String.t(), list(module())}]
|
||||
|
||||
defmacro __using__(opts) do
|
||||
quote bind_quoted: [guides_from: opts[:guides_from]] do
|
||||
|
|
|
@ -2,15 +2,9 @@ defmodule Ash.Resource.Dsl do
|
|||
@attribute %Ash.Dsl.Entity{
|
||||
name: :attribute,
|
||||
describe: """
|
||||
Declares an attribute on the resource
|
||||
Declares an attribute on the resource.
|
||||
|
||||
For more information, see `{{link:ash:guide:attributes.md}}`
|
||||
|
||||
Type can be either a built in type (see `Ash.Type`) for more, or a module
|
||||
implementing the `Ash.Type` behaviour.
|
||||
|
||||
*Strings are trimmed by default*. If you want to retain whitespace, use
|
||||
`attribute :foo, :string, constraints: [trim?: false]`
|
||||
For more information, see {{link:ash:guide:topics/attributes.md}}
|
||||
""",
|
||||
examples: [
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue