# `Macaw.Frame.Document.Schema.Layer`
[🔗](https://github.com/dcoai/macaw_frame/blob/v0.1.0/lib/macaw/frame/document/schema/layer.ex#L1)

The layer's node kinds of the frame document (spec/02 §5): the layer's common keys, its
data and steps, channels, scale renames, offset, options, inline label and tooltip.

**Nothing here lists a kind's channels or options** (§5.2, §5.3): a layer kind declares
its own, and the validator reads them through the registry. The `:channels`, `:options`
and `:step` nodes are therefore open, keyed by strings: their keys are the kind's and
the operation's. `Macaw.Frame.Document.Schema` builds the tables once, at compile time.

# `describe`

```elixir
@spec describe(term()) :: [Macaw.Frame.Document.Schema.Spec.t()] | {:error, list()}
```

The key specs of a layer-level node kind, in the order of its table in spec/02;
`{:error, [{[], {:enum, kinds}}]}` for a kind this module does not describe. An open
node answers only the keys every owner shares (a step's `"op"`).

    iex> Macaw.Frame.Document.Schema.Layer.describe(:channels)
    []

# `kinds`

```elixir
@spec kinds() :: [atom(), ...]
```

The node kinds this module describes, in spec/02 §1.2's order.

# `open`

```elixir
@spec open() :: [atom(), ...]
```

The node kinds whose keys are their owner's strings, not the schema's (§5.3, §5.4).

# `scale_names`

```elixir
@spec scale_names() :: [String.t(), ...]
```

The model's scale names a layer's `scales` renames (§5.1).

---

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