ash/documentation/dsls/DSL:-Ash.Registry.cheatmd
2023-09-13 23:18:14 -04:00

65 lines
932 B
Text

# DSL: Ash.Registry.Dsl
A small DSL for declaring an `Ash.Registry`. Not generally necessary any longer.
`Ash.Registry` can be used generically, but the main way it is used in Ash is to provide a compile-time registry for an Ash Api.
## entries
List the entries present in this registry
---
* [entry](#entries-entry)
### Examples
```
entries do
entry MyApp.User
entry MyApp.Post
entry MyApp.Comment
end
```
### Reference
| Name | Type | Default | Docs |
| --- | --- | --- | --- |
| `warn_on_empty?` | `boolean` | true | Set to `false` to ignore warnings about an empty registry |
## entries.entry
```elixir
entry entry
```
---
Introspection Target: `Ash.Registry.Entry`
A reference to an ash module (typically a resource)
---
### Examples
```
entry MyApp.User
```
### Reference
| Name | Type | Docs |
| --- | --- | --- |
| `entry` - required-arg 1 | `atom` | The referenced module |