# `Arc.Descriptor`
[🔗](https://github.com/Cratis/Arc.Elixir/blob/main/lib/arc/descriptor.ex#L4)

Compile-time metadata of a command or a read model, exposed as `__arc__/0` on the artifact.

Discovery reads descriptors from compiled modules; there is no runtime reflection over source.

# `t`

```elixir
@type t() :: %Arc.Descriptor{
  authorization: term(),
  doc: term(),
  fields: term(),
  key: term(),
  kind: term(),
  model: term(),
  model_types: term(),
  module: term(),
  name: term(),
  namespace: term(),
  queries: term(),
  response: term()
}
```

# `command_route`

```elixir
@spec command_route(t(), keyword()) :: String.t()
```

The conventional route of a command, built from `route_prefix`, the namespace segments after
`segments_to_skip`, and the kebab-cased command name.

# `query_name`

```elixir
@spec query_name(t(), Arc.Descriptor.Query.t()) :: String.t()
```

The fully qualified name of a query: the container module plus the PascalCase function name.

# `query_route`

```elixir
@spec query_route(t(), Arc.Descriptor.Query.t(), keyword()) :: String.t()
```

The conventional route of a query.

# `slice_location`

```elixir
@spec slice_location(t(), integer()) :: {String.t(), String.t(), String.t()}
```

Resolves the module, feature and slice of an artifact from its namespace segments, with the
same rules the C# generator uses: fewer than three segments fill the deepest parts first.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
